长庆项目day3
This commit is contained in:
parent
f81eef47b7
commit
b3bfb9bc4b
|
@ -57,11 +57,13 @@ public class CqEnterController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/rulesByType")
|
@GetMapping("/rulesByType")
|
||||||
public R rulesByType(Integer typeId){
|
public R rulesByType(Integer typeId, Long cellId){
|
||||||
if(typeId == null){
|
if(typeId == null){
|
||||||
typeId = cqMemberMapper.speciallyForVisitors();
|
typeId = cqMemberMapper.speciallyForVisitors();
|
||||||
}
|
}
|
||||||
List<TypeRules> typeRules = cqEnterMapper.rulesByType(typeId);
|
|
||||||
|
|
||||||
|
List<TypeRules> typeRules = cqEnterMapper.rulesByType(typeId, cellId);
|
||||||
return R.ok().put("data", typeRules);
|
return R.ok().put("data", typeRules);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ public interface CqEnterMapper extends BaseMapper<TenEnterConfigEntity> {
|
||||||
|
|
||||||
List<PeronType> getPersonType();
|
List<PeronType> getPersonType();
|
||||||
|
|
||||||
List<TypeRules> rulesByType(int typeId);
|
List<TypeRules> rulesByType(int typeId, @Param("cellId") Long cellId);
|
||||||
|
|
||||||
int changeState(int ruleId);
|
int changeState(int ruleId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
cell_id ;
|
cell_id ;
|
||||||
</select>
|
</select>
|
||||||
<select id="getPersonType" resultType="net.shapelight.modules.iCq.controller.enter.vo.PeronType">
|
<select id="getPersonType" resultType="net.shapelight.modules.iCq.controller.enter.vo.PeronType">
|
||||||
select label_id, name FROM ten_label WHERE delete_flag = 0
|
select type, name FROM ten_label WHERE delete_flag = 0
|
||||||
</select>
|
</select>
|
||||||
<select id="rulesByType" resultType="net.shapelight.modules.iCq.controller.enter.vo.TypeRules">
|
<select id="rulesByType" resultType="net.shapelight.modules.iCq.controller.enter.vo.TypeRules">
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -36,6 +36,10 @@
|
||||||
ON
|
ON
|
||||||
tec.id = tect.enter_config_id
|
tec.id = tect.enter_config_id
|
||||||
WHERE
|
WHERE
|
||||||
tect.type_id = #{typeId};
|
tect.type_id = #{typeId}
|
||||||
|
<if test="cellId != null and cellId != ''">
|
||||||
|
and cell_id = #{cell_id};
|
||||||
|
</if>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue