Commit 253fbd90 by songyinghui

feat: 欢迎语可添加数量上限调整为50条

parent 4fdaff72
...@@ -53,7 +53,7 @@ public interface TabHaobanWelcomeMapper { ...@@ -53,7 +53,7 @@ public interface TabHaobanWelcomeMapper {
* @author : YongEn * @author : YongEn
* @date : 2022/2/10 * @date : 2022/2/10
*/ */
long countByWxEnterpriseId(@Param("wxEnterpriseId") String wxEnterpriseId); long countByWxEnterpriseId(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("type") Integer type);
/** /**
* 条件查询欢迎语配置 * 条件查询欢迎语配置
......
...@@ -140,7 +140,7 @@ public class WelcomeServiceImpl implements WelcomeService { ...@@ -140,7 +140,7 @@ public class WelcomeServiceImpl implements WelcomeService {
private String saveWelcomeCheck(SaveWelcomeBO bo) { private String saveWelcomeCheck(SaveWelcomeBO bo) {
// 校验欢迎语数量、适用部门、适用员工数量 // 校验欢迎语数量、适用部门、适用员工数量
long count = welcomeMapper.countByWxEnterpriseId(bo.getWxEnterpriseId()); long count = welcomeMapper.countByWxEnterpriseId(bo.getWxEnterpriseId(), bo.getType());
if (count >= WELCOME_LIMIT) { if (count >= WELCOME_LIMIT) {
return "欢迎语条目超过限制"; return "欢迎语条目超过限制";
} }
......
...@@ -134,6 +134,9 @@ ...@@ -134,6 +134,9 @@
from tab_haoban_welcome from tab_haoban_welcome
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and status_flag = 1 and status_flag = 1
<if test="type != null">
and `type` = #{type}
</if>
</select> </select>
<select id="listAllWelcome" resultMap="BaseResultMap"> <select id="listAllWelcome" resultMap="BaseResultMap">
......
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