Przeglądaj źródła

修改数据,同步代码

luowei 2 lat temu
rodzic
commit
a2a157484c

+ 1 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysRoleController.java

@@ -15,6 +15,7 @@ import com.xunmei.system.domain.SysUserRole;
 import com.xunmei.system.service.ISysDeptService;
 import com.xunmei.system.service.ISysRoleService;
 import com.xunmei.system.service.ISysUserService;
+import org.apache.ibatis.annotations.Delete;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;

+ 1 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysRoleServiceImpl.java

@@ -61,6 +61,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
         }else{
             page = new Page<>();
         }
+        role.setDelFlag(0);
         page = roleMapper.selectPage( page,new QueryWrapper<>(role));
         TableDataInfo tableDataInfo = new TableDataInfo();
         tableDataInfo.setMsg("操作成功");

+ 4 - 4
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysRoleMapper.xml

@@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	
 	<select id="selectRoleById" parameterType="Long" resultMap="SysRoleResult">
 		<include refid="selectRoleVo"/>
-		where r.role_id = #{roleId}
+		where r.id = #{roleId}
 	</select>
 	
 	<select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult">
@@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		 where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
 	</select>
 	
- 	<insert id="insertRole" parameterType="com.xunmei.system.api.domain.SysRole" useGeneratedKeys="true" keyProperty="roleId">
+ 	<insert id="insertRole" parameterType="com.xunmei.system.api.domain.SysRole" useGeneratedKeys="true" keyProperty="id">
  		insert into sys_role(
  			<if test="id != null and id != 0">id,</if>
  			<if test="roleName != null and roleName != ''">role_name,</if>
@@ -135,7 +135,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
  			update_time = sysdate()
  		</set>
- 		where role_id = #{roleId}
+ 		where id = #{id}
 	</update>
 	
 	<delete id="deleteRoleById" parameterType="Long">
@@ -143,7 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  	</delete>
  	
  	<delete id="deleteRoleByIds" parameterType="Long">
- 	    update sys_role set del_flag = '2' where role_id in
+ 	    update sys_role set del_flag = '2' where id in
  		<foreach collection="array" item="roleId" open="(" separator="," close=")">
  			#{roleId}
         </foreach>