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