Commit 2931efd4 by 杨林龙

修改API修改状态接口 BUG yangll

1 parent 2c346e50
......@@ -2,6 +2,7 @@ package cn.com.glsx.openplatform.mapper;
import cn.com.glsx.openplatform.model.PlatformApi;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
......@@ -17,4 +18,6 @@ import java.util.List;
public interface PlatformApiMapper extends OreMapper<PlatformApi> {
List<PlatformApi> getApiMgrList();
int updateById(@Param("id") int id, @Param("status") int status);
}
\ No newline at end of file
......@@ -32,9 +32,6 @@ public class ApiMgrServiceImpl implements ApiMgrService {
@Override
public int startAndStop(int id, int status) {
PlatformApi api = new PlatformApi();
api.setId(id);
api.setStatus(status);
return apiMapper.updateByPrimaryKeySelective(api);
return apiMapper.updateById(id,status);
}
}
......@@ -24,6 +24,13 @@
create_time, update_time, create_by, update_by, remark
</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
<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!