Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
ed3173eea9
|
@ -43,8 +43,8 @@ public class Dept extends BaseEntity
|
|||
/** 负责人 */
|
||||
private String leader;
|
||||
|
||||
/** 联系电话 */
|
||||
@Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符")
|
||||
/** 联系联系方式 */
|
||||
@Size(min = 0, max = 11, message = "联系联系方式长度不能超过11个字符")
|
||||
private String phone;
|
||||
|
||||
/** 邮箱 */
|
||||
|
|
|
@ -124,7 +124,7 @@ public final class RegexpUtils {
|
|||
public static final String DATE_SLASH_REGEXP = "^[0-9]{4}\\.[0-9]{2}\\.[0-9]{2}$";
|
||||
|
||||
/**
|
||||
* 匹配电话
|
||||
* 匹配联系方式
|
||||
* <p>
|
||||
* <p>
|
||||
* 格式为: 0XXX-XXXXXX(10-13位首位必须为0) 或0XXX XXXXXXX(10-13位首位必须为0) 或
|
||||
|
|
|
@ -20,27 +20,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<sql id="selectAdVo">
|
||||
select
|
||||
ad_id,
|
||||
type,
|
||||
picture,
|
||||
url,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
remark,
|
||||
deleted,
|
||||
url_type
|
||||
from bst_ad
|
||||
bad.ad_id,
|
||||
bad.type,
|
||||
bad.picture,
|
||||
bad.url,
|
||||
bad.create_by,
|
||||
bad.create_time,
|
||||
bad.update_by,
|
||||
bad.update_time,
|
||||
bad.remark,
|
||||
bad.deleted,
|
||||
bad.url_type
|
||||
from bst_ad bad
|
||||
</sql>
|
||||
|
||||
<sql id="searchCondition">
|
||||
<if test="query.adId != null and query.adId != ''"> and ad_id = #{query.adId}</if>
|
||||
<if test="query.type != null and query.type != ''"> and type = #{query.type}</if>
|
||||
<if test="query.picture != null and query.picture != ''"> and picture = #{query.picture}</if>
|
||||
<if test="query.url != null and query.url != ''"> and url = #{query.url}</if>
|
||||
<if test="query.deleted != null "> and deleted = #{query.deleted}</if>
|
||||
<if test="query.urlType != null and query.urlType != ''"> and url_type = #{query.urlType}</if>
|
||||
<if test="query.adId != null and query.adId != ''"> and bad.ad_id = #{query.adId}</if>
|
||||
<if test="query.type != null and query.type != ''"> and bad.type = #{query.type}</if>
|
||||
<if test="query.picture != null and query.picture != ''"> and bad.picture = #{query.picture}</if>
|
||||
<if test="query.url != null and query.url != ''"> and bad.url = #{query.url}</if>
|
||||
<if test="query.deleted != null "> and bad.deleted = #{query.deleted}</if>
|
||||
<if test="query.urlType != null and query.urlType != ''"> and bad.url_type = #{query.urlType}</if>
|
||||
${query.params.dataScope}
|
||||
</sql>
|
||||
|
||||
|
|
|
@ -59,8 +59,8 @@ public class Area extends BaseEntity
|
|||
@ApiModelProperty("联系人")
|
||||
private String contact;
|
||||
|
||||
@Excel(name = "联系电话")
|
||||
@ApiModelProperty("联系电话")
|
||||
@Excel(name = "联系联系方式")
|
||||
@ApiModelProperty("联系联系方式")
|
||||
private String phone;
|
||||
|
||||
@Excel(name = "运营区状态:0-运营中;1-停运")
|
||||
|
|
|
@ -73,7 +73,7 @@ public interface ArticleMapper
|
|||
*/
|
||||
public int deleteArticleByIds(Long[] ids);
|
||||
|
||||
public ArticleVO selectChildrenByiId(Long id);
|
||||
public ArticleVO selectChildrenById(Long id);
|
||||
|
||||
ArticleVO selectArticleByCode(ArticleCategoryQuery articleCategoryQuery);
|
||||
}
|
||||
|
|
|
@ -47,10 +47,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectChildrenByiId" resultType="com.ruoyi.bst.article.domain.ArticleVO">
|
||||
<select id="selectChildrenById" resultType="com.ruoyi.bst.article.domain.ArticleVO">
|
||||
<include refid="selectArticleVo"/>
|
||||
where id = #{categoryId}
|
||||
</select>
|
||||
|
||||
<select id="selectArticleByCode" resultType="com.ruoyi.bst.article.domain.ArticleVO">
|
||||
<include refid="selectArticleVo"/>
|
||||
where code = #{code}
|
||||
|
|
|
@ -65,4 +65,6 @@ public interface ArticleService
|
|||
ArticleVO selectChildrenByCategoryId(Long id);
|
||||
|
||||
ArticleVO selectArticleByCode(ArticleCategoryQuery articleCategoryQuery);
|
||||
|
||||
ArticleVO selectArticleByCategoryId(Long id);
|
||||
}
|
||||
|
|
|
@ -130,11 +130,16 @@ public class ArticleServiceImpl implements ArticleService
|
|||
|
||||
@Override
|
||||
public ArticleVO selectChildrenByCategoryId(Long id) {
|
||||
return articleMapper.selectChildrenByiId(id);
|
||||
return articleMapper.selectChildrenById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArticleVO selectArticleByCode(ArticleCategoryQuery articleCategoryQuery) {
|
||||
return articleMapper.selectArticleByCode(articleCategoryQuery);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArticleVO selectArticleByCategoryId(Long id) {
|
||||
return articleMapper.selectChildrenById(id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,13 +64,7 @@ public interface ArticleCategoryMapper
|
|||
*/
|
||||
int deleteArticleCategoryById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除文章分类
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteArticleCategoryByIds(Long[] ids);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -82,10 +76,18 @@ public interface ArticleCategoryMapper
|
|||
|
||||
/**
|
||||
* 查询子分类
|
||||
* @param ids
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
List<Long> selectChildren(Long[] ids);
|
||||
List<Long> selectChildren(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除文章分类
|
||||
*
|
||||
* @param childrenIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
|
||||
void deleteArticleCategoryByIds(List<Long> childrenIds);
|
||||
}
|
||||
|
|
|
@ -5,11 +5,14 @@ import java.util.*;
|
|||
import com.github.pagehelper.PageHelper;
|
||||
import com.ruoyi.bst.area.domain.AreaQuery;
|
||||
import com.ruoyi.bst.area.domain.AreaVO;
|
||||
import com.ruoyi.bst.article.domain.ArticleVO;
|
||||
import com.ruoyi.bst.article.service.ArticleService;
|
||||
import com.ruoyi.bst.device.utils.DeviceUtil;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.ServiceUtil;
|
||||
import com.ruoyi.common.utils.collection.CollectionUtils;
|
||||
import org.checkerframework.checker.units.qual.A;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.bst.articleCategory.mapper.ArticleCategoryMapper;
|
||||
|
@ -31,6 +34,9 @@ public class ArticleCategoryServiceImpl implements ArticleCategoryService
|
|||
@Autowired
|
||||
private ArticleCategoryMapper articleCategoryMapper;
|
||||
|
||||
@Autowired
|
||||
private ArticleService articleService;
|
||||
|
||||
/**
|
||||
* 查询文章分类
|
||||
*
|
||||
|
@ -110,6 +116,11 @@ public class ArticleCategoryServiceImpl implements ArticleCategoryService
|
|||
return articleCategoryMapper.updateArticleCategory(articleCategory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteArticleCategoryByIds(Long[] ids) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
private Boolean hasParent(Long id){
|
||||
Long parentId = selectArticleCategoryById(id).getParentId();
|
||||
if (parentId != null){
|
||||
|
@ -123,30 +134,31 @@ public class ArticleCategoryServiceImpl implements ArticleCategoryService
|
|||
* @param ids 需要删除的文章分类主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteArticleCategoryByIds(Long[] ids)
|
||||
{
|
||||
List<Long> cids = articleCategoryMapper.selectChildren(ids);
|
||||
List<Long> allIdsToDelete = new ArrayList<>();
|
||||
allIdsToDelete.addAll(cids);
|
||||
allIdsToDelete.addAll(Arrays.asList(ids));
|
||||
|
||||
if (!allIdsToDelete.isEmpty()){
|
||||
return articleCategoryMapper.deleteArticleCategoryByIds(ids);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public int deleteArticleCategoryByIds(List<Long> ids)
|
||||
// {
|
||||
//
|
||||
// return articleCategoryMapper.deleteArticleCategoryByIds(ids);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 删除文章分类信息
|
||||
*
|
||||
* @param id 文章分类主键
|
||||
* @param categoryId 文章分类主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteArticleCategoryById(Long id)
|
||||
public int deleteArticleCategoryById(Long categoryId)
|
||||
{
|
||||
return articleCategoryMapper.deleteArticleCategoryById(id);
|
||||
List<Long> childrenIds = articleCategoryMapper.selectChildren(categoryId);
|
||||
if (childrenIds != null){
|
||||
articleCategoryMapper.deleteArticleCategoryByIds(childrenIds);
|
||||
}
|
||||
ArticleVO articleVO = articleService.selectArticleByCategoryId(categoryId);
|
||||
if (articleVO != null){
|
||||
return 0;
|
||||
}
|
||||
return articleCategoryMapper.deleteArticleCategoryById(categoryId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,8 +34,8 @@ public class CustomerService extends BaseEntity
|
|||
@ApiModelProperty("客服姓名")
|
||||
private String name;
|
||||
|
||||
@Excel(name = "客服电话")
|
||||
@ApiModelProperty("客服电话")
|
||||
@Excel(name = "客服联系方式")
|
||||
@ApiModelProperty("客服联系方式")
|
||||
private String contact;
|
||||
|
||||
@JsonFormat(pattern = "HH:mm:ss")
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
package com.ruoyi.bst.customerService.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CustomerServiceVO extends CustomerService{
|
||||
|
||||
@ApiModelProperty("运营区名称")
|
||||
private String areaName;
|
||||
|
||||
}
|
||||
|
|
|
@ -26,19 +26,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
bcs.is_enabled,
|
||||
bcs.create_time,
|
||||
bcs.store_id,
|
||||
su.agent_id
|
||||
bcs.deleted,
|
||||
su.agent_id,
|
||||
ba.name as area_name
|
||||
from bst_customer_service bcs
|
||||
left join sys_user su on bcs.store_id = su.user_id
|
||||
left join bst_area ba on bcs.area_id = ba.id
|
||||
</sql>
|
||||
|
||||
<sql id="searchCondition">
|
||||
<if test="query.id != null "> and id = #{query.id}</if>
|
||||
<if test="query.areaId != null "> and area_id = #{query.areaId}</if>
|
||||
<if test="query.name != null and query.name != ''"> and name like concat('%', #{query.name}, '%')</if>
|
||||
<if test="query.contact != null and query.contact != ''"> and contact = #{query.contact}</if>
|
||||
<if test="query.startTime != null "> and start_time = #{query.startTime}</if>
|
||||
<if test="query.endTime != null "> and end_time = #{query.endTime}</if>
|
||||
<if test="query.isEnabled != null "> and is_enabled = #{query.isEnabled}</if>
|
||||
<if test="query.id != null "> and bcs.id = #{query.id}</if>
|
||||
<if test="query.areaId != null "> and bcs.area_id = #{query.areaId}</if>
|
||||
<if test="query.name != null and query.name != ''"> and bcs.name like concat('%', #{query.name}, '%')</if>
|
||||
<if test="query.contact != null and query.contact != ''"> and bcs.contact like concat('%',#{query.contact},'%')</if>
|
||||
<if test="query.startTime != null "> and bcs.start_time = #{query.startTime}</if>
|
||||
<if test="query.endTime != null "> and bcs.end_time = #{query.endTime}</if>
|
||||
<if test="query.isEnabled != null "> and bcs.is_enabled = #{query.isEnabled}</if>
|
||||
<if test="query.deleted != null "> and bcs.deleted = #{query.deleted}</if>
|
||||
${@com.ruoyi.framework.util.DataScopeUtil@dataScope(
|
||||
null,
|
||||
"bcs.store_id,su.agent_id",
|
||||
|
@ -59,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectCustomerServiceById" parameterType="Long" resultMap="CustomerServiceResult">
|
||||
<include refid="selectCustomerServiceVo"/>
|
||||
where id = #{id}
|
||||
where bcs.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCustomerService" parameterType="CustomerService" useGeneratedKeys="true" keyProperty="id">
|
||||
|
@ -219,6 +223,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<sql id="updateColumns">
|
||||
<if test="data.areaId != null">area_id = #{data.areaId},</if>
|
||||
<if test="data.storeId != null">store_id = #{data.storeId},</if>
|
||||
<if test="data.name != null">name = #{data.name},</if>
|
||||
<if test="data.contact != null and data.contact != ''">contact = #{data.contact},</if>
|
||||
<if test="data.startTime != null">start_time = #{data.startTime},</if>
|
||||
|
|
|
@ -92,9 +92,9 @@ public class ArticleCategoryController extends BaseController
|
|||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:articleCategory:remove')")
|
||||
@Log(title = "文章分类", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult remove(@PathVariable Long id)
|
||||
{
|
||||
return toAjax(articleCategoryService.deleteArticleCategoryByIds(ids));
|
||||
return success(articleCategoryService.deleteArticleCategoryById(id));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@ public class CustomerServiceController extends BaseController
|
|||
{
|
||||
startPage();
|
||||
startOrderBy();
|
||||
query.setScope(true);
|
||||
List<CustomerServiceVO> list = customerServiceService.selectCustomerServiceList(query);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
@ -111,6 +112,7 @@ public class CustomerServiceController extends BaseController
|
|||
if (!customerServiceValidator.canEdit(customerService.getId())) {
|
||||
return AjaxResult.error("您没有权限修改ID为" + customerService.getId() + "的客服信息");
|
||||
}
|
||||
customerService.setStoreId(areaService.selectAreaById(customerService.getAreaId()).getUserId());
|
||||
return toAjax(customerServiceService.updateCustomerService(customerService));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user