Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
T
tcm-system
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
TCM
tcm-system
Commits
d11399bd
Commit
d11399bd
authored
Jun 02, 2022
by
tangfang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改码模板
parent
54a394b5
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
151 additions
and
31 deletions
+151
-31
CompanyCodeController.java
...gding/web/authority/controller/CompanyCodeController.java
+1
-1
CodeModelController.java
...ng/web/authority/controller/code/CodeModelController.java
+16
-0
CodeModelDao.java
...ava/com/pangding/web/authority/dao/code/CodeModelDao.java
+8
-0
CodeModelDaoImpl.java
...angding/web/authority/dao/code/Impl/CodeModelDaoImpl.java
+16
-1
CompanyDaoImpl.java
...ngding/web/authority/dao/company/impl/CompanyDaoImpl.java
+34
-24
CodeModelService.java
...pangding/web/authority/service/code/CodeModelService.java
+13
-0
CodeModelServiceImpl.java
...web/authority/service/code/impl/CodeModelServiceImpl.java
+62
-4
NewCompanyServiceImpl.java
...authority/service/company/impl/NewCompanyServiceImpl.java
+1
-1
No files found.
src/main/java/com/pangding/web/authority/controller/CompanyCodeController.java
View file @
d11399bd
...
...
@@ -58,7 +58,7 @@ public class CompanyCodeController {
@ApiModelProperty
(
value
=
"保存商户二维码"
,
notes
=
"返回保存二维码结果"
)
public
ResponseResult
saveCompanyCode
(
@RequestBody
CompanyCodeReqVo
req
){
return
ResponseResult
.
result
(
companyCodeService
.
saveComapnyCode
(
req
));
return
ResponseResult
.
result
AllowNull
(
companyCodeService
.
saveComapnyCode
(
req
));
}
...
...
src/main/java/com/pangding/web/authority/controller/code/CodeModelController.java
View file @
d11399bd
...
...
@@ -39,6 +39,12 @@ public class CodeModelController {
return
ResponseResult
.
result
(
codeModelService
.
queryCodeModelList
(
req
));
}
@RequestMapping
(
value
=
"/queryList"
)
@ApiModelProperty
(
value
=
"查询码模板列表包含扩展信息"
,
notes
=
"返回所有码模板列表包含扩展信息"
)
public
ResponseResult
<
List
<
CodeModelResVo
>>
queryList
(
@RequestBody
CodeModelReqVo
req
)
{
return
ResponseResult
.
result
(
codeModelService
.
queryList
(
req
));
}
@RequestMapping
(
value
=
"/queryCodeModel"
)
@ApiModelProperty
(
value
=
"查询码模板详情"
,
notes
=
"返回码模板详细信息"
)
public
ResponseResult
<
CodeModelResVo
>
queryCodeModel
(
@RequestBody
CodeModelReqVo
req
)
{
...
...
@@ -60,5 +66,15 @@ public class CodeModelController {
return
ResponseResult
.
result
(
codeModelService
.
saveCodeModel
(
req
));
}
@RequestMapping
(
value
=
"/removeCodeModel"
)
@ApiModelProperty
(
value
=
"删除码模板"
,
notes
=
"返回码模板删除信息"
)
public
ResponseResult
<
CodeModelVo
>
removeCodeModel
(
@RequestBody
CodeModelReqVo
req
)
{
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"codeModelId"
,
req
.
getCodeModelId
())
.
checkException
();
codeModelService
.
removeCodeModel
(
req
);
return
ResponseResult
.
resultAllowNull
(
null
);
}
}
src/main/java/com/pangding/web/authority/dao/code/CodeModelDao.java
View file @
d11399bd
package
com
.
pangding
.
web
.
authority
.
dao
.
code
;
import
com.pangding.web.vo.system.req.code.CodeModelReqVo
;
import
com.pangding.web.vo.system.res.code.CodeModelExtendResVo
;
import
com.pangding.web.vo.system.res.code.CodeModelResVo
;
import
com.yanzuoguang.dao.BaseDao
;
import
com.yanzuoguang.util.vo.PageSizeData
;
...
...
@@ -24,4 +25,11 @@ public interface CodeModelDao extends BaseDao {
*/
List
<
CodeModelResVo
>
queryCodeModelList
(
CodeModelReqVo
req
);
/**
* 查询码模板列表(不分页包含扩展字段)
* @param req
* @return
*/
List
<
CodeModelExtendResVo
>
querylList
(
CodeModelReqVo
req
);
}
src/main/java/com/pangding/web/authority/dao/code/Impl/CodeModelDaoImpl.java
View file @
d11399bd
...
...
@@ -3,6 +3,7 @@ package com.pangding.web.authority.dao.code.Impl;
import
com.pangding.web.authority.dao.code.CodeModelDao
;
import
com.pangding.web.vo.system.pd.code.CodeModelVo
;
import
com.pangding.web.vo.system.req.code.CodeModelReqVo
;
import
com.pangding.web.vo.system.res.code.CodeModelExtendResVo
;
import
com.pangding.web.vo.system.res.code.CodeModelResVo
;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
import
com.yanzuoguang.util.vo.PageSizeData
;
...
...
@@ -16,12 +17,22 @@ public class CodeModelDaoImpl extends BaseDaoImpl implements CodeModelDao {
// 查询列表
private
static
final
String
QUERY_LIST
=
"QUERY_LIST"
;
private
static
final
String
QUERY_LIST_EXTEND
=
"QUERY_LIST_EXTEND"
;
@Override
protected
void
init
()
{
register
(
CodeModelVo
.
class
);
table
.
add
(
QUERY_LIST
,
"SELECT * FROM pd_code_model WHERE 1=1 "
);
table
.
add
(
QUERY_LIST
,
"SELECT * FROM pd_code_model WHERE 1=1 "
)
.
add
(
"codeModelName"
,
"AND code_model_name LIKE concat('%', ?,'%') "
)
.
add
(
"codeType"
,
"AND code_type = ? "
);
table
.
add
(
QUERY_LIST_EXTEND
,
"select a.*,b.code_model_extend_id,b.param_name,b.param_remark,b.param_sort "
+
" from pd_code_model a LEFT JOIN pd_code_model_extend b on a.code_model_id = b.code_model_id"
+
" WHERE 1=1 "
)
.
add
(
"codeModelName"
,
"AND code_model_name LIKE concat('%', ?,'%') "
)
.
add
(
"codeType"
,
"AND code_type = ? "
);
}
...
...
@@ -36,4 +47,8 @@ public class CodeModelDaoImpl extends BaseDaoImpl implements CodeModelDao {
return
this
.
query
(
CodeModelResVo
.
class
,
QUERY_LIST
,
req
);
}
public
List
<
CodeModelExtendResVo
>
querylList
(
CodeModelReqVo
req
)
{
return
this
.
query
(
CodeModelExtendResVo
.
class
,
QUERY_LIST_EXTEND
,
req
);
}
}
src/main/java/com/pangding/web/authority/dao/company/impl/CompanyDaoImpl.java
View file @
d11399bd
...
...
@@ -36,35 +36,45 @@ public class CompanyDaoImpl extends BaseDaoImpl implements CompanyDao {
"service_charge_status,service_charge_type,service_charge,late_fee "
+
" from pd_company a inner join pd_company_extend b on a.id = b.id "
+
"where 1=1 {WHERE} order by create_time desc"
)
.
add
(
"companyName"
,
"and company_name LIKE concat('%', ?,'%') "
)
.
add
(
"companyType"
,
"and company_type = ? "
)
.
add
(
"companyAttribute"
,
"and company_attribute = ? "
)
.
add
(
"examineStatus"
,
"and examine_status = ?"
)
.
add
(
"companyId"
,
"and invitation_company_id = ? "
)
.
add
(
"invitationCode"
,
"and (invitation_code = or chlid_invitation_code) "
)
.
add
(
"contactName"
,
"and contact_name LIKE concat('%', ?,'%') "
)
.
add
(
"contactPhone"
,
"and contact_phone = ? "
)
.
add
(
"status"
,
"and status = ? "
)
.
add
(
"withdrawRule"
,
"and withdraw_rule = ? "
)
.
add
(
"serviceChargeStatus"
,
"and service_charge_status = ? "
)
.
add
(
"startDate"
,
"and create_time >= ? "
)
.
add
(
"endDate"
,
"and create_time <= ? "
);
.
add
(
"province"
,
" and province = ? "
)
.
add
(
"city"
,
" and city = ? "
)
.
add
(
"area"
,
" and area = ? "
)
.
add
(
"companyName"
,
" and company_name LIKE concat('%', ?,'%') "
)
.
add
(
"companyType"
,
" and company_type = ? "
)
.
add
(
"companyAttribute"
,
" and company_attribute = ? "
)
.
add
(
"examineStatus"
,
" and examine_status = ?"
)
.
add
(
"companyId"
,
" and invitation_company_id = ? "
)
.
add
(
"invitationCode"
,
" and (invitation_code = or chlid_invitation_code) "
)
.
add
(
"contactName"
,
" and contact_name LIKE concat('%', ?,'%') "
)
.
add
(
"contactPhone"
,
" and contact_phone = ? "
)
.
add
(
"status"
,
" and status = ? "
)
.
add
(
"withdrawRule"
,
" and withdraw_rule = ? "
)
.
add
(
"serviceChargeStatus"
,
" and service_charge_status = ? "
)
.
add
(
"startDate"
,
" and create_time >= ? "
)
.
add
(
"endDate"
,
" and create_time <= ? "
)
.
add
(
"search"
,
" and (company_name LIKE concat('%', ?,'%') or (contact_name LIKE concat('%', ?,'%') )"
);
table
.
add
(
QUERY_COMPANY_TOTAL
,
"select COUNT(a.id) AS company_num,"
+
"SUM(CASE WHEN examine_status = 2 THEN 1 ELSE 0 END) AS company_use_num "
+
" from pd_company a inner join pd_company_extend b on a.id = b.id "
+
"where 1=1 {WHERE} order by create_time desc"
)
.
add
(
"companyName"
,
"and company_name LIKE concat('%', ?,'%') "
)
.
add
(
"companyType"
,
"and company_type = ? "
)
.
add
(
"companyAttribute"
,
"and company_attribute = ? "
)
.
add
(
"examineStatus"
,
"and examine_status = ?"
)
.
add
(
"invitationCompanyId"
,
"and invitation_company_id = ? "
)
.
add
(
"invitationCode"
,
"and invitation_code = ? "
)
.
add
(
"contactName"
,
"and contact_name LIKE concat('%', ?,'%') "
)
.
add
(
"contactPhone"
,
"and contact_phone = ? "
)
.
add
(
"status"
,
"and status = ? "
)
.
add
(
"startDate"
,
"and create_time >= ? "
)
.
add
(
"endDate"
,
"and create_time <= ? "
);
.
add
(
"province"
,
" and province = ? "
)
.
add
(
"city"
,
" and city = ? "
)
.
add
(
"area"
,
" and area = ? "
)
.
add
(
"companyName"
,
" and company_name LIKE concat('%', ?,'%') "
)
.
add
(
"companyType"
,
" and company_type = ? "
)
.
add
(
"companyAttribute"
,
" and company_attribute = ? "
)
.
add
(
"examineStatus"
,
" and examine_status = ?"
)
.
add
(
"companyId"
,
" and invitation_company_id = ? "
)
.
add
(
"invitationCode"
,
" and (invitation_code = or chlid_invitation_code) "
)
.
add
(
"contactName"
,
" and contact_name LIKE concat('%', ?,'%') "
)
.
add
(
"contactPhone"
,
" and contact_phone = ? "
)
.
add
(
"status"
,
" and status = ? "
)
.
add
(
"withdrawRule"
,
" and withdraw_rule = ? "
)
.
add
(
"serviceChargeStatus"
,
" and service_charge_status = ? "
)
.
add
(
"startDate"
,
" and create_time >= ? "
)
.
add
(
"endDate"
,
" and create_time <= ? "
)
.
add
(
"search"
,
" and (company_name LIKE concat('%', ?,'%') or (contact_name LIKE concat('%', ?,'%') )"
);
}
...
...
src/main/java/com/pangding/web/authority/service/code/CodeModelService.java
View file @
d11399bd
...
...
@@ -24,6 +24,13 @@ public interface CodeModelService {
*/
List
<
CodeModelResVo
>
queryCodeModelList
(
CodeModelReqVo
req
);
/**
* 查询码模板列表(不分页 包含扩展信息)
* @param req
* @return
*/
List
<
CodeModelResVo
>
queryList
(
CodeModelReqVo
req
);
/**
* 查询码模板详情
* @param req
...
...
@@ -38,4 +45,10 @@ public interface CodeModelService {
*/
CodeModelVo
saveCodeModel
(
CodeModelReqVo
req
);
/**
* 删除模板信息
* @param req
*/
void
removeCodeModel
(
CodeModelReqVo
req
);
}
src/main/java/com/pangding/web/authority/service/code/impl/CodeModelServiceImpl.java
View file @
d11399bd
...
...
@@ -6,14 +6,19 @@ import com.pangding.web.authority.service.code.CodeModelService;
import
com.pangding.web.vo.system.pd.code.CodeModelExtendVo
;
import
com.pangding.web.vo.system.pd.code.CodeModelVo
;
import
com.pangding.web.vo.system.req.code.CodeModelReqVo
;
import
com.pangding.web.vo.system.res.code.CodeModelExtendResVo
;
import
com.pangding.web.vo.system.res.code.CodeModelResVo
;
import
com.yanzuoguang.util.base.ObjectHelper
;
import
com.yanzuoguang.util.helper.DateHelper
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
com.yanzuoguang.util.vo.PageSizeData
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
@Service
public
class
CodeModelServiceImpl
implements
CodeModelService
{
...
...
@@ -33,13 +38,41 @@ public class CodeModelServiceImpl implements CodeModelService {
return
codeModelDao
.
queryCodeModelList
(
req
);
}
@Override
public
List
<
CodeModelResVo
>
queryList
(
CodeModelReqVo
req
)
{
List
<
CodeModelExtendResVo
>
codeModelExtendResVoList
=
codeModelDao
.
querylList
(
req
);
// 子数据
Map
<
String
,
CodeModelResVo
>
mapTo
=
new
LinkedHashMap
<>();
for
(
CodeModelExtendResVo
item
:
codeModelExtendResVoList
)
{
CodeModelResVo
codeModelResVo
=
mapTo
.
get
(
item
.
getCodeModelId
());
if
(
codeModelResVo
==
null
)
{
codeModelResVo
=
new
CodeModelResVo
();
ObjectHelper
.
writeWithFrom
(
codeModelResVo
,
item
);
mapTo
.
put
(
item
.
getCodeModelId
(),
codeModelResVo
);
}
codeModelResVo
.
getCodeModelExtendList
().
add
(
item
);
}
List
<
CodeModelResVo
>
codeModelResVoList
=
new
ArrayList
<>();
codeModelResVoList
.
addAll
(
mapTo
.
values
());
return
codeModelResVoList
;
}
@Override
public
CodeModelResVo
queryCodeModel
(
CodeModelReqVo
req
){
CodeModelResVo
codeModelResVo
=
codeModelDao
.
load
(
req
,
CodeModelResVo
.
class
);
// TODO 查询码模板扩展信息
// 查询码模板扩展信息
CodeModelExtendVo
codeModelExtendVo
=
new
CodeModelExtendVo
();
codeModelExtendVo
.
setCodeModelId
(
codeModelResVo
.
getCodeModelId
());
List
<
CodeModelExtendVo
>
codeModelExtendVoList
=
codeModelExtendDao
.
loadList
(
codeModelExtendVo
,
CodeModelExtendVo
.
class
);
codeModelResVo
.
setCodeModelExtendList
(
codeModelExtendVoList
);
return
codeModelResVo
;
}
@Override
public
CodeModelVo
saveCodeModel
(
CodeModelReqVo
req
){
CodeModelVo
codeModelVo
=
new
CodeModelVo
();
String
codeModelId
=
req
.
getCodeModelId
();
...
...
@@ -54,28 +87,53 @@ public class CodeModelServiceImpl implements CodeModelService {
codeModelId
=
StringHelper
.
getNewID
();
ObjectHelper
.
writeWithFromClass
(
codeModelVo
,
req
);
codeModelVo
.
setCodeModelId
(
codeModelId
);
codeModelVo
.
setCreateTime
(
DateHelper
.
getNow
());
codeModelDao
.
create
(
codeModelVo
);
List
<
CodeModelExtendVo
>
codeModelExtendVoList
=
req
.
getCodeModelExtendList
();
for
(
CodeModelExtendVo
codeModelExtendVo:
codeModelExtendVoList
)
{
codeModelExtendVo
.
setCodeModelId
(
codeModelId
);
codeModelExtendVo
.
setCodeModelExtendId
(
StringHelper
.
getNewID
());
codeModelExtendDao
.
create
(
codeModelExtendVo
);
}
codeModelExtendDao
.
createArray
(
codeModelExtendVoList
);
}
else
{
ObjectHelper
.
writeWithFromClass
(
codeModelVo
,
req
);
codeModelVo
.
setCodeModelId
(
codeModelResVo
.
getCodeModelId
());
codeModelDao
.
update
(
codeModelVo
);
CodeModelExtendVo
delCodeModelExtendVo
=
new
CodeModelExtendVo
();
delCodeModelExtendVo
.
setCodeModelId
(
codeModelVo
.
getCodeModelId
());
codeModelExtendDao
.
remove
(
delCodeModelExtendVo
);
List
<
CodeModelExtendVo
>
codeModelExtendVoList
=
req
.
getCodeModelExtendList
();
codeModelExtendDao
.
updateArray
(
codeModelExtendVoList
);
for
(
CodeModelExtendVo
codeModelExtendVo:
codeModelExtendVoList
)
{
codeModelExtendVo
.
setCodeModelId
(
codeModelVo
.
getCodeModelId
());
codeModelExtendVo
.
setCodeModelExtendId
(
StringHelper
.
getNewID
());
codeModelExtendDao
.
create
(
codeModelExtendVo
);
}
}
}
else
{
// 主键存在,修改
ObjectHelper
.
writeWithFromClass
(
codeModelVo
,
req
);
codeModelDao
.
update
(
codeModelVo
);
CodeModelExtendVo
delCodeModelExtendVo
=
new
CodeModelExtendVo
();
delCodeModelExtendVo
.
setCodeModelId
(
codeModelVo
.
getCodeModelId
());
codeModelExtendDao
.
remove
(
delCodeModelExtendVo
);
List
<
CodeModelExtendVo
>
codeModelExtendVoList
=
req
.
getCodeModelExtendList
();
codeModelExtendDao
.
updateArray
(
codeModelExtendVoList
);
for
(
CodeModelExtendVo
codeModelExtendVo:
codeModelExtendVoList
)
{
codeModelExtendVo
.
setCodeModelId
(
codeModelVo
.
getCodeModelId
());
codeModelExtendVo
.
setCodeModelExtendId
(
StringHelper
.
getNewID
());
codeModelExtendDao
.
create
(
codeModelExtendVo
);
}
}
return
codeModelVo
;
}
public
void
removeCodeModel
(
CodeModelReqVo
req
){
CodeModelVo
codeModelVo
=
new
CodeModelVo
();
String
codeModelId
=
req
.
getCodeModelId
();
codeModelVo
.
setCodeModelId
(
codeModelId
);
codeModelDao
.
remove
(
codeModelVo
);
CodeModelExtendVo
delCodeModelExtendVo
=
new
CodeModelExtendVo
();
delCodeModelExtendVo
.
setCodeModelId
(
codeModelVo
.
getCodeModelId
());
codeModelExtendDao
.
remove
(
delCodeModelExtendVo
);
}
}
src/main/java/com/pangding/web/authority/service/company/impl/NewCompanyServiceImpl.java
View file @
d11399bd
...
...
@@ -109,7 +109,7 @@ public class NewCompanyServiceImpl implements NewCompanyService {
// roleReqVo.setCompanyId(req.getId());
// RoleVo roleVo = roleDao.load(roleReqVo, RoleVo.class);
return
null
;
return
companyResVo
;
}
...
...
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