Commit 62fc825d authored by jennie chen's avatar jennie chen

1.应用配置添加上架/下架功能

2.修改部分细节
parent 15a4155d
......@@ -24,6 +24,7 @@ public class BizAgentApplicationMallConvert {
entity.setCollectNumber(model.getCollectNumber());
entity.setClickNumber(model.getClickNumber());
entity.setIsCopy(model.getIsCopy());
entity.setIsSale(model.getIsSale());
return entity;
}
......@@ -35,6 +36,7 @@ public class BizAgentApplicationMallConvert {
model.setCollectNumber(entity.getCollectNumber());
model.setClickNumber(entity.getClickNumber());
model.setIsCopy(entity.getIsCopy());
model.setIsSale(entity.getIsSale());
return model;
}
......@@ -93,6 +95,7 @@ public class BizAgentApplicationMallConvert {
}
dto.setIsCopy(entity.getIsCopy());
dto.setIsSale(entity.getIsSale());
return dto;
}
......@@ -104,6 +107,7 @@ public class BizAgentApplicationMallConvert {
entity.setCollectNumber(dto.getCollectNumber());
entity.setClickNumber(dto.getClickNumber());
entity.setIsCopy(dto.getIsCopy());
entity.setIsSale(dto.getIsSale());
return entity;
}
}
\ No newline at end of file
......@@ -48,7 +48,6 @@ public class BizMemberAgentApplicationCollectConvert {
dto.setCreatedTime(entity.getCreatedTime());
dto.setModifier(entity.getModifier());
dto.setModifiedTime(entity.getModifiedTime());
dto.setSysVersion(entity.getSysVersion());
return dto;
}
......@@ -63,7 +62,6 @@ public class BizMemberAgentApplicationCollectConvert {
entity.setCreatedTime(dto.getCreatedTime());
entity.setModifier(dto.getModifier());
entity.setModifiedTime(dto.getModifiedTime());
entity.setSysVersion(dto.getSysVersion());
return entity;
}
}
\ No newline at end of file
......@@ -78,4 +78,17 @@ public class BizAgentApplicationMallDto extends AgentApplicationInfoDto{
public void setIsCopy(java.lang.String isCopy){
this.isCopy = isCopy;
}
/** is_sale
*是否上架应用 1、Y 是 2、N 否
*/
private java.lang.String isSale;
public java.lang.String getIsSale(){
return this.isSale;
}
public void setIsSale(java.lang.String isSale){
this.isSale = isSale;
}
}
\ No newline at end of file
......@@ -114,16 +114,4 @@ public class BizMemberAgentApplicationCollectDto {
public void setModifiedTime(java.util.Date modifiedTime){
this.modifiedTime = modifiedTime;
}
/** SYS_VERSION
*版本号
*/
private java.lang.Integer sysVersion;
public java.lang.Integer getSysVersion(){
return this.sysVersion;
}
public void setSysVersion(java.lang.Integer sysVersion){
this.sysVersion = sysVersion;
}
}
\ No newline at end of file
......@@ -80,6 +80,20 @@ public class BizAgentApplicationMallEntity {
public void setIsCopy(java.lang.String isCopy){
this.isCopy = isCopy;
}
/** is_sale
*是否上架应用 1、Y 是 2、N 否
*/
private java.lang.String isSale;
public java.lang.String getIsSale(){
return this.isSale;
}
public void setIsSale(java.lang.String isSale){
this.isSale = isSale;
}
/** is_deleted
*是否删除 1、Y 是 2、N 否
*/
......
......@@ -119,7 +119,21 @@ public class BizAgentApplicationMallModel extends BaseModelClass implements Seri
this.isCopy = isCopy;
super.addValidField("isCopy");
}
/** is_sale
*是否上架应用 1、Y 是 2、N 否
*/
private java.lang.String isSale;
@Column(name = "is_sale",length = 1)
public java.lang.String getIsSale(){
return this.isSale;
}
public void setIsSale(java.lang.String isSale){
this.isSale = isSale;
super.addValidField("isSale");
}
/** is_deleted
*是否删除 1、Y 是 2、N 否
......
......@@ -9,7 +9,7 @@ import cn.com.yict.framemax.web.permission.Permission;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
@Permission(value = Access.Anonymous)
@Permission(value = Access.Safety)
public interface BizAgentApplicationMallRest extends BaseRest {
/**
......
......@@ -9,7 +9,7 @@ import cn.com.yict.framemax.web.permission.Permission;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
@Permission(value = Access.Anonymous)
@Permission(value = Access.Safety)
public interface BizAgentApplicationPublishRest extends BaseRest {
BizAgentApplicationPublishDto getById(@RequestParam java.lang.Integer id) throws Exception;
......
......@@ -21,7 +21,7 @@ public class BizAgentApplicationMallRestImpl implements BizAgentApplicationMallR
private AgentApplicationMallService agentApplicationMallService;
@Resource
private BizAgentApplicationMallService service;
private BizAgentApplicationMallService bizAgentApplicationMallService;
@Override
public BizAgentApplicationMallDto publishAgentToMall(BizAgentApplicationMallDto dto) throws Exception {
......@@ -29,12 +29,12 @@ public class BizAgentApplicationMallRestImpl implements BizAgentApplicationMallR
Assert.notNull(dto.getAgentPublishId());
Assert.notNull(dto.getAgentType());
Assert.notNull(dto.getIsCopy());
return BizAgentApplicationMallConvert.entityToDto(service.save(BizAgentApplicationMallConvert.dtoToEntity(dto)));
return BizAgentApplicationMallConvert.entityToDto(bizAgentApplicationMallService.save(BizAgentApplicationMallConvert.dtoToEntity(dto)));
}
public BizAgentApplicationMallDto getById(java.lang.Integer id) throws Exception{
Assert.notNull(id);
return BizAgentApplicationMallConvert.entityToDto(service.get(id));
return BizAgentApplicationMallConvert.entityToDto(bizAgentApplicationMallService.get(id));
}
@Override
......@@ -44,7 +44,7 @@ public class BizAgentApplicationMallRestImpl implements BizAgentApplicationMallR
public List<BizAgentApplicationMallDto> getList(PagingInfo pagingInfo) throws Exception{
List<BizAgentApplicationMallDto> resultList = new ArrayList<>();
List<BizAgentApplicationMallEntity> byExample = service.findByExample(pagingInfo);
List<BizAgentApplicationMallEntity> byExample = bizAgentApplicationMallService.findByExample(pagingInfo);
for(BizAgentApplicationMallEntity entity : byExample){
resultList.add(BizAgentApplicationMallConvert.entityToDto(entity));
}
......@@ -55,12 +55,12 @@ public class BizAgentApplicationMallRestImpl implements BizAgentApplicationMallR
public BizAgentApplicationMallDto update(BizAgentApplicationMallDto dto) throws Exception{
Assert.notNull(dto);
BizAgentApplicationMallEntity entity = BizAgentApplicationMallConvert.dtoToEntity(dto);
return BizAgentApplicationMallConvert.entityToDto(service.update(entity));
return BizAgentApplicationMallConvert.entityToDto(bizAgentApplicationMallService.update(entity));
}
public void deletedById(java.lang.Integer id) throws Exception{
Assert.notNull(id);
service.deletedById(id);
bizAgentApplicationMallService.deletedById(id);
}
@Override
......
......@@ -3,7 +3,6 @@ package cn.com.poc.agent_application.rest.impl;
import java.util.List;
import javax.annotation.Resource;
import cn.com.poc.agent_application.service.BizAgentApplicationMallService;
import org.springframework.stereotype.Component;
import cn.com.poc.agent_application.rest.BizAgentApplicationPublishRest;
import cn.com.poc.agent_application.service.BizAgentApplicationPublishService;
......@@ -17,19 +16,16 @@ import org.springframework.util.Assert;
@Component
public class BizAgentApplicationPublishRestImpl implements BizAgentApplicationPublishRest {
@Resource
private BizAgentApplicationMallService bizAgentApplicationMallService;
@Resource
private BizAgentApplicationPublishService service;
private BizAgentApplicationPublishService bizAgentApplicationPublishService;
public BizAgentApplicationPublishDto getById(java.lang.Integer id) throws Exception{
Assert.notNull(id);
return BizAgentApplicationPublishConvert.entityToDto(service.get(id));
return BizAgentApplicationPublishConvert.entityToDto(bizAgentApplicationPublishService.get(id));
}
public List<BizAgentApplicationPublishDto> getList(BizAgentApplicationPublishDto dto,PagingInfo pagingInfo) throws Exception{
return service
return bizAgentApplicationPublishService
.findByExample(BizAgentApplicationPublishConvert.dtoToEntity(dto),pagingInfo)
.stream()
.map(BizAgentApplicationPublishConvert::entityToDto)
......@@ -39,18 +35,17 @@ public class BizAgentApplicationPublishRestImpl implements BizAgentApplicationPu
public BizAgentApplicationPublishDto save(BizAgentApplicationPublishDto dto) throws Exception{
Assert.notNull(dto);
BizAgentApplicationPublishEntity entity = BizAgentApplicationPublishConvert.dtoToEntity(dto);
return BizAgentApplicationPublishConvert.entityToDto(service.save(entity));
return BizAgentApplicationPublishConvert.entityToDto(bizAgentApplicationPublishService.save(entity));
}
public BizAgentApplicationPublishDto update(BizAgentApplicationPublishDto dto) throws Exception{
Assert.notNull(dto);
BizAgentApplicationPublishEntity entity = BizAgentApplicationPublishConvert.dtoToEntity(dto);
return BizAgentApplicationPublishConvert.entityToDto(service.update(entity));
return BizAgentApplicationPublishConvert.entityToDto(bizAgentApplicationPublishService.update(entity));
}
public void deletedById(java.lang.Integer id) throws Exception{
Assert.notNull(id);
service.deletedById(id);
bizAgentApplicationPublishService.deletedById(id);
}
}
\ No newline at end of file
......@@ -54,7 +54,7 @@ public class BizAgentApplicationMallServiceImpl extends BaseServiceImpl
List<BizAgentApplicationMallEntity> result = new ArrayList<BizAgentApplicationMallEntity>();
BizAgentApplicationMallModel model = new BizAgentApplicationMallModel();
model.setIsDeleted("N");
List<BizAgentApplicationMallModel> models = this.repository.findByExample(model,pagingInfo);
List<BizAgentApplicationMallModel> models = this.repository.findByExample(model,"id desc",pagingInfo);
if (CollectionUtils.isNotEmpty(models)) {
result = models.stream().map(BizAgentApplicationMallConvert::modelToEntity).collect(Collectors.toList());
}
......@@ -90,6 +90,9 @@ public class BizAgentApplicationMallServiceImpl extends BaseServiceImpl
if (entity.getIsCopy() != null){
model.setIsCopy(entity.getIsCopy());
}
if(entity.getIsSale() != null){
model.setIsSale(entity.getIsSale());
}
if (entity.getIsDeleted() != null) {
model.setIsDeleted(entity.getIsDeleted());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment