Commit 6c362f9f authored by liuxinben's avatar liuxinben

修改派出所表的更新和插入

parent 4ba9ec03
......@@ -729,8 +729,8 @@ public class TaskListApi {
* 修改派出所代码
*/
@RequestMapping("updatePolice")
public boolean updatePolice(String policeCode,String policeName) {
return taskListService.updatePolice(policeCode,policeName);
public boolean updatePolice(String policeCode,String policeName,String newPoliceCode) {
return taskListService.updatePolice(policeCode,policeName,newPoliceCode);
}
/**
......
......@@ -1636,11 +1636,11 @@ public interface TaskListMapper {
@Select("SELECT * FROM POLICE_DIC WHERE POLICE_CODE = #{policeCode}")
public List<Map<String,Object>> selectPoliceListByPoliceCode(String policeCode);
@Insert("INSERT INTO POLICE_DIC VALUES (#{policeCode},#{policeName})")
public boolean insertPolice(String policeCode,String policeName);
@Insert("INSERT INTO POLICE_DIC (POLICE_CODE,POLICE_NAME) VALUES (#{policeCode},#{policeName})")
public boolean insertPolice(@Param("policeCode") String policeCode,@Param("policeName") String policeName);
@Update("UPDATE POLICE_DIC SET POLICE_NAME = #{policeName} WHERE POLICE_CODE = #{policeCode}")
public boolean updatePolice(String policeCode,String policeName);
@Update("UPDATE POLICE_DIC SET POLICE_NAME = #{policeName},POLICE_CODE = #{newPoliceCode} WHERE POLICE_CODE = #{policeCode}")
public boolean updatePolice(@Param("policeCode") String policeCode,@Param("policeName") String policeName,@Param("newPoliceCode") String newPoliceCode);
@Delete("DELETE FROM POLICE_DIC WHERE POLICE_CODE = #{policeCode}")
public boolean deletePolice(String policeCode);
......
......@@ -122,7 +122,7 @@ public interface TaskListService {
public boolean insertPolice(String policeCode,String policeName);
public boolean updatePolice(String policeCode,String policeName);
public boolean updatePolice(String policeCode,String policeName,String newPoliceCode);
public boolean deletePolice(String policeCode);
}
......@@ -1318,8 +1318,8 @@ public class TaskListServiceImpl implements TaskListService {
}
@Override
public boolean updatePolice(String policeCode,String policeName){
return taskListMapper.updatePolice(policeCode,policeName);
public boolean updatePolice(String policeCode,String policeName,String newPoliceCode){
return taskListMapper.updatePolice(policeCode,policeName,newPoliceCode);
}
@Override
......
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