Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
easy-affair-show
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
赵啸非
easy-affair-show
Commits
eb4e2865
Commit
eb4e2865
authored
Jun 17, 2022
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户保存设计
parent
da3320f2
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
3 deletions
+85
-3
eas-manager/src/main/java/com/mortals/xhx/module/customer/service/impl/CustomerWorkCollectServiceImpl.java
...customer/service/impl/CustomerWorkCollectServiceImpl.java
+7
-0
eas-manager/src/main/java/com/mortals/xhx/module/customer/service/impl/CustomerWorkDesignServiceImpl.java
.../customer/service/impl/CustomerWorkDesignServiceImpl.java
+37
-2
eas-manager/src/main/java/com/mortals/xhx/module/customer/web/CustomerWorkDesignController.java
...xhx/module/customer/web/CustomerWorkDesignController.java
+8
-0
eas-manager/src/main/java/com/mortals/xhx/module/masterplate/service/impl/MasterplateUseInfoServiceImpl.java
...sterplate/service/impl/MasterplateUseInfoServiceImpl.java
+15
-0
eas-manager/src/main/java/com/mortals/xhx/module/masterplate/web/MasterplateUseInfoController.java
.../module/masterplate/web/MasterplateUseInfoController.java
+18
-1
No files found.
eas-manager/src/main/java/com/mortals/xhx/module/customer/service/impl/CustomerWorkCollectServiceImpl.java
View file @
eb4e2865
...
@@ -6,8 +6,15 @@ import com.mortals.framework.model.PageInfo;
...
@@ -6,8 +6,15 @@ import com.mortals.framework.model.PageInfo;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.xhx.module.customer.dao.CustomerWorkCollectDao
;
import
com.mortals.xhx.module.customer.dao.CustomerWorkCollectDao
;
import
com.mortals.xhx.module.customer.model.CustomerWorkCollectEntity
;
import
com.mortals.xhx.module.customer.model.CustomerWorkCollectEntity
;
import
com.mortals.xhx.module.customer.model.CustomerWorkDesignEntity
;
import
com.mortals.xhx.module.customer.service.CustomerWorkCollectService
;
import
com.mortals.xhx.module.customer.service.CustomerWorkCollectService
;
import
com.mortals.xhx.module.masterplate.model.MasterplateUseInfoEntity
;
import
com.mortals.xhx.module.masterplate.service.MasterplateUseInfoService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
/**
* CustomerWorkCollectService
* CustomerWorkCollectService
* 客户收藏信息 service实现
* 客户收藏信息 service实现
...
...
eas-manager/src/main/java/com/mortals/xhx/module/customer/service/impl/CustomerWorkDesignServiceImpl.java
View file @
eb4e2865
package
com.mortals.xhx.module.customer.service.impl
;
package
com.mortals.xhx.module.customer.service.impl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.xhx.module.customer.model.CustomerWorkCollectEntity
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.xhx.module.customer.dao.CustomerWorkDesignDao
;
import
com.mortals.xhx.module.customer.dao.CustomerWorkDesignDao
;
import
com.mortals.xhx.module.customer.model.CustomerWorkDesignEntity
;
import
com.mortals.xhx.module.customer.model.CustomerWorkDesignEntity
;
import
com.mortals.xhx.module.customer.model.CustomerWorkDesignStatEntity
;
import
com.mortals.xhx.module.customer.model.CustomerWorkDesignStatQuery
;
import
com.mortals.xhx.module.customer.service.CustomerWorkDesignService
;
import
com.mortals.xhx.module.customer.service.CustomerWorkDesignService
;
import
com.mortals.xhx.module.customer.service.CustomerWorkDesignStatService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* CustomerWorkDesignService
* CustomerWorkDesignService
* 客户作品信息 service实现
* 客户作品信息 service实现
...
@@ -18,6 +27,9 @@ import com.mortals.xhx.module.customer.service.CustomerWorkDesignService;
...
@@ -18,6 +27,9 @@ import com.mortals.xhx.module.customer.service.CustomerWorkDesignService;
@Service
(
"customerWorkDesignService"
)
@Service
(
"customerWorkDesignService"
)
public
class
CustomerWorkDesignServiceImpl
extends
AbstractCRUDServiceImpl
<
CustomerWorkDesignDao
,
CustomerWorkDesignEntity
,
Long
>
implements
CustomerWorkDesignService
{
public
class
CustomerWorkDesignServiceImpl
extends
AbstractCRUDServiceImpl
<
CustomerWorkDesignDao
,
CustomerWorkDesignEntity
,
Long
>
implements
CustomerWorkDesignService
{
@Autowired
private
CustomerWorkDesignStatService
customerWorkDesignStatService
;
@Override
@Override
protected
CustomerWorkDesignEntity
findBefore
(
CustomerWorkDesignEntity
params
,
PageInfo
pageInfo
,
Context
context
)
throws
AppException
{
protected
CustomerWorkDesignEntity
findBefore
(
CustomerWorkDesignEntity
params
,
PageInfo
pageInfo
,
Context
context
)
throws
AppException
{
pageInfo
.
setPrePageResult
(-
1
);
pageInfo
.
setPrePageResult
(-
1
);
...
@@ -30,4 +42,27 @@ public class CustomerWorkDesignServiceImpl extends AbstractCRUDServiceImpl<Custo
...
@@ -30,4 +42,27 @@ public class CustomerWorkDesignServiceImpl extends AbstractCRUDServiceImpl<Custo
this
.
validData
(
entity
,
context
);
this
.
validData
(
entity
,
context
);
entity
.
setCustomerId
(
this
.
getContextUserId
(
context
));
entity
.
setCustomerId
(
this
.
getContextUserId
(
context
));
}
}
@Override
protected
void
saveAfter
(
CustomerWorkDesignEntity
entity
,
Context
context
)
throws
AppException
{
CustomerWorkDesignStatEntity
cQuery
=
new
CustomerWorkDesignStatEntity
();
cQuery
.
setCustomerId
(
entity
.
getCustomerId
());
List
<
CustomerWorkDesignStatEntity
>
cwdList
=
customerWorkDesignStatService
.
find
(
cQuery
);
if
(
CollectionUtils
.
isEmpty
(
cwdList
)){
CustomerWorkDesignStatEntity
cwdEntity
=
new
CustomerWorkDesignStatEntity
();
cwdEntity
.
setCustomerId
(
entity
.
getCustomerId
());
cwdEntity
.
setCustomerDesignPictures
(
1
);
cwdEntity
.
setCustomerDesignVideos
(
0
);
cwdEntity
.
setCreateTime
(
new
Date
());
cwdEntity
.
setUpdateTime
(
new
Date
());
customerWorkDesignStatService
.
save
(
cwdEntity
);
}
else
{
CustomerWorkDesignStatEntity
cwdEntity
=
cwdList
.
get
(
0
);
CustomerWorkDesignStatQuery
updateEntity
=
new
CustomerWorkDesignStatQuery
();
updateEntity
.
setId
(
cwdEntity
.
getId
());
updateEntity
.
setCustomerDesignPicturesIncrement
(
1
);
updateEntity
.
setUpdateTime
(
new
Date
());
customerWorkDesignStatService
.
update
(
updateEntity
);
}
}
}
}
\ No newline at end of file
eas-manager/src/main/java/com/mortals/xhx/module/customer/web/CustomerWorkDesignController.java
View file @
eb4e2865
...
@@ -72,6 +72,14 @@ public class CustomerWorkDesignController extends BaseCRUDJsonBodyMappingControl
...
@@ -72,6 +72,14 @@ public class CustomerWorkDesignController extends BaseCRUDJsonBodyMappingControl
query
.
setCustomerId
(
this
.
getCurUser
().
getId
());
query
.
setCustomerId
(
this
.
getCurUser
().
getId
());
}
}
@Override
protected
void
saveBefore
(
CustomerWorkDesignEntity
entity
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
if
(
this
.
getCurUser
()==
null
||
this
.
getCurUser
().
getUserType
()!=
Constant
.
CUSTOMER_USER
){
throw
new
AppException
(
"非法用户,不可访问"
);
}
entity
.
setCustomerId
(
this
.
getCurUser
().
getId
());
}
@PostMapping
({
"picture/list"
})
@PostMapping
({
"picture/list"
})
@UnAuth
@UnAuth
...
...
eas-manager/src/main/java/com/mortals/xhx/module/masterplate/service/impl/MasterplateUseInfoServiceImpl.java
View file @
eb4e2865
...
@@ -2,6 +2,10 @@ package com.mortals.xhx.module.masterplate.service.impl;
...
@@ -2,6 +2,10 @@ package com.mortals.xhx.module.masterplate.service.impl;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.xhx.module.design.model.DesignMasterplateEntity
;
import
com.mortals.xhx.module.design.model.DesignMasterplateQuery
;
import
com.mortals.xhx.module.design.service.DesignMasterplateService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.xhx.module.masterplate.dao.MasterplateUseInfoDao
;
import
com.mortals.xhx.module.masterplate.dao.MasterplateUseInfoDao
;
...
@@ -17,8 +21,19 @@ import com.mortals.xhx.module.masterplate.service.MasterplateUseInfoService;
...
@@ -17,8 +21,19 @@ import com.mortals.xhx.module.masterplate.service.MasterplateUseInfoService;
@Service
(
"masterplateUseInfoService"
)
@Service
(
"masterplateUseInfoService"
)
public
class
MasterplateUseInfoServiceImpl
extends
AbstractCRUDServiceImpl
<
MasterplateUseInfoDao
,
MasterplateUseInfoEntity
,
Long
>
implements
MasterplateUseInfoService
{
public
class
MasterplateUseInfoServiceImpl
extends
AbstractCRUDServiceImpl
<
MasterplateUseInfoDao
,
MasterplateUseInfoEntity
,
Long
>
implements
MasterplateUseInfoService
{
@Autowired
private
DesignMasterplateService
designMasterplateService
;
@Override
@Override
protected
MasterplateUseInfoEntity
findBefore
(
MasterplateUseInfoEntity
entity
,
PageInfo
pageInfo
,
Context
context
)
throws
AppException
{
protected
MasterplateUseInfoEntity
findBefore
(
MasterplateUseInfoEntity
entity
,
PageInfo
pageInfo
,
Context
context
)
throws
AppException
{
return
entity
;
return
entity
;
}
}
@Override
protected
void
saveAfter
(
MasterplateUseInfoEntity
entity
,
Context
context
)
throws
AppException
{
DesignMasterplateQuery
update
=
new
DesignMasterplateQuery
();
update
.
setId
(
entity
.
getMasterplateId
());
update
.
setMasterplateUseNumIncrement
(
1
);
designMasterplateService
.
update
(
update
);
}
}
}
\ No newline at end of file
eas-manager/src/main/java/com/mortals/xhx/module/masterplate/web/MasterplateUseInfoController.java
View file @
eb4e2865
package
com.mortals.xhx.module.masterplate.web
;
package
com.mortals.xhx.module.masterplate.web
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.key.Constant
;
import
com.mortals.xhx.module.customer.model.CustomerEntity
;
import
com.mortals.xhx.module.customer.model.CustomerWorkDesignEntity
;
import
com.mortals.xhx.module.customer.service.CustomerService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -36,6 +41,8 @@ public class MasterplateUseInfoController extends BaseCRUDJsonBodyMappingControl
...
@@ -36,6 +41,8 @@ public class MasterplateUseInfoController extends BaseCRUDJsonBodyMappingControl
@Autowired
@Autowired
private
ParamService
paramService
;
private
ParamService
paramService
;
@Autowired
private
CustomerService
customerService
;
public
MasterplateUseInfoController
(){
public
MasterplateUseInfoController
(){
super
.
setModuleDesc
(
"模版使用信息"
);
super
.
setModuleDesc
(
"模版使用信息"
);
...
@@ -46,5 +53,15 @@ public class MasterplateUseInfoController extends BaseCRUDJsonBodyMappingControl
...
@@ -46,5 +53,15 @@ public class MasterplateUseInfoController extends BaseCRUDJsonBodyMappingControl
super
.
init
(
model
,
context
);
super
.
init
(
model
,
context
);
}
}
@Override
protected
void
saveBefore
(
MasterplateUseInfoEntity
entity
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
if
(
this
.
getCurUser
()==
null
||
this
.
getCurUser
().
getUserType
()!=
Constant
.
CUSTOMER_USER
){
throw
new
AppException
(
"非法用户,不可访问"
);
}
CustomerEntity
customerEntity
=
customerService
.
get
(
this
.
getCurUser
().
getId
());
entity
.
setCustomerId
(
this
.
getCurUser
().
getId
());
entity
.
setCustomerName
(
customerEntity
.
getCustName
());
entity
.
setCustomerTelphone
(
customerEntity
.
getContactTelphone
());
entity
.
setCustomerOrganization
(
customerEntity
.
getOrganization
());
}
}
}
\ 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