Commit 003d8bf7 authored by 周健威's avatar 周健威

Merge remote-tracking branch 'origin/dev' into dev

parents f909993b d7784935
......@@ -11,5 +11,6 @@ import lombok.Data;
*/
@Data
public class BannerDto extends PageParam {
Integer status;
String title;
}
......@@ -138,6 +138,11 @@ public class IndustryApplicationInfo implements Serializable {
@ApiModelProperty(value = "修改时间", hidden = true )
private Date updTime;
/**
* 是否提供定制:1、提供,2、不提供
*/
private Integer customized;
@Transient
private String firstTitle;
......
......@@ -9,6 +9,7 @@ import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.upyuns.platform.rs.website.dto.BannerDto;
import com.upyuns.platform.rs.website.entity.Banner;
import com.upyuns.platform.rs.website.mapper.BannerMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
......@@ -69,6 +70,12 @@ public class BannerBiz extends BaseBiz<BannerMapper, Banner> {
Example example = new Example(Banner.class);
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("isDel", 0);
if (bannerDto.getStatus() != null) {
criteria.andEqualTo("status", bannerDto.getStatus());
}
if (StringUtils.isNotBlank(bannerDto.getTitle())) {
criteria.andLike("title", "%" + bannerDto.getTitle() + "%");
}
example.orderBy("updTime").desc();
Query query = new Query(bannerDto);
PageDataVO<Banner> pageDataVO = PageDataVO.pageInfo(query, () -> mapper.selectByExample(example));
......
......@@ -49,12 +49,6 @@ public class IndustryApplicationTypeBiz extends BaseBiz<IndustryApplicationTypeM
if (old == null) {
return ObjectRestResponse.createFailedResult(ResultCode.NOTEXIST_CODE, ResultCode.getMsg(ResultCode.NOTEXIST_CODE));
}
if (StringUtils.isNotBlank(industryApplicationType.getTitle())) {
IndustryApplicationType nameValue = getOneByTitle(industryApplicationType.getTitle());
if (nameValue != null) {
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "行业应用类型已存在!");
}
}
BeanUtil.copyProperties(industryApplicationType, old, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
updateSelectiveByIdRe(old);
} else {
......
......@@ -39,13 +39,19 @@ public class NewsTypeBiz extends BaseBiz<NewsTypeMapper, NewsType> {
}
if (StringUtils.isNotBlank(newsType.getNameCn())) {
NewsType nameValue = getOneByName(newsType.getNameCn());
if (nameValue != null) {
if (nameValue != null && !nameValue.getId().equals(newsType.getId())) {
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "新闻分类名称已存在!");
}
}
BeanUtil.copyProperties(newsType, old, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
updateSelectiveByIdRe(old);
} else {
if (StringUtils.isNotBlank(newsType.getNameCn())) {
NewsType nameValue = getOneByName(newsType.getNameCn());
if (nameValue != null) {
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "新闻分类名称已存在!");
}
}
insertSelectiveRe(newsType);
}
return ObjectRestResponse.succ();
......
......@@ -23,8 +23,10 @@
<if test="title != null and title != ''">
and iai.title like concat('%', #{title}, '%')
</if>
and iai.is_del = 0
</where>
order by upd_time DESC
order by iai.upd_time DESC
</select>
</mapper>
\ No newline at end of file
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