Commit 2931efd4 by 杨林龙

修改API修改状态接口 BUG yangll

1 parent 2c346e50
...@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.mapper; ...@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.mapper;
import cn.com.glsx.openplatform.model.PlatformApi; import cn.com.glsx.openplatform.model.PlatformApi;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.oreframework.datasource.mybatis.mapper.OreMapper; import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List; import java.util.List;
...@@ -17,4 +18,6 @@ import java.util.List; ...@@ -17,4 +18,6 @@ import java.util.List;
public interface PlatformApiMapper extends OreMapper<PlatformApi> { public interface PlatformApiMapper extends OreMapper<PlatformApi> {
List<PlatformApi> getApiMgrList(); List<PlatformApi> getApiMgrList();
int updateById(@Param("id") int id, @Param("status") int status);
} }
\ No newline at end of file \ No newline at end of file
...@@ -32,9 +32,6 @@ public class ApiMgrServiceImpl implements ApiMgrService { ...@@ -32,9 +32,6 @@ public class ApiMgrServiceImpl implements ApiMgrService {
@Override @Override
public int startAndStop(int id, int status) { public int startAndStop(int id, int status) {
PlatformApi api = new PlatformApi(); return apiMapper.updateById(id,status);
api.setId(id);
api.setStatus(status);
return apiMapper.updateByPrimaryKeySelective(api);
} }
} }
...@@ -24,6 +24,13 @@ ...@@ -24,6 +24,13 @@
create_time, update_time, create_by, update_by, remark create_time, update_time, create_by, update_by, remark
</sql> </sql>
<update id="updateById">
update t_platform_api
set status = #{status,jdbcType=INTEGER},
update_time = NOW()
where id = #{id,jdbcType=INTEGER}
</update>
<select id="getApiMgrList" resultType="cn.com.glsx.openplatform.model.PlatformApi"> <select id="getApiMgrList" resultType="cn.com.glsx.openplatform.model.PlatformApi">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!