zhangsiqi
7 months ago
8 changed files with 163 additions and 48 deletions
@ -0,0 +1,14 @@ |
|||
package com.ruoyi.system.mapper; |
|||
|
|||
|
|||
import com.ruoyi.system.domain.SysErpMaterialSysTechnicalTeam; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface SysErpMaterialSysTechnicalTeamMapper { |
|||
List<SysErpMaterialSysTechnicalTeam> selectSysMaterialSysTechnicalTeamList(SysErpMaterialSysTechnicalTeam sysErpMaterialSysTechnicalTeam); |
|||
SysErpMaterialSysTechnicalTeam selectSysMaterialSysTechnicalTeamListById(Long iconId); |
|||
Integer insertSysErpMaterialSysTechnicalTeam(SysErpMaterialSysTechnicalTeam sysErpMaterialSysTechnicalTeam); |
|||
Integer deleteSysErpMaterialSysTechnicalTeam(List<Long> list); |
|||
Integer updateSysErpMaterialSysTechnicalTeam(SysErpMaterialSysTechnicalTeam sysErpMaterialSysTechnicalTeam); |
|||
} |
@ -0,0 +1,14 @@ |
|||
package com.ruoyi.system.service; |
|||
|
|||
import com.ruoyi.system.domain.SysErpMaterialSysTechnicalTeam; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface ISysErpMaterialSysTechnicalTeamService { |
|||
public List<SysErpMaterialSysTechnicalTeam> selectSysMaterialSysTechnicalTeamList(SysErpMaterialSysTechnicalTeam sysErpMaterialSysTechnicalTeam); |
|||
public SysErpMaterialSysTechnicalTeam selectSysMaterialSysTechnicalTeamListById(Long iconId); |
|||
public Integer insertSysErpMaterialSysTechnicalTeam(SysErpMaterialSysTechnicalTeam sysErpMaterialSysTechnicalTeam); |
|||
public Integer deleteSysErpMaterialSysTechnicalTeam(List<Long> list); |
|||
public Integer updateSysErpMaterialSysTechnicalTeam(SysErpMaterialSysTechnicalTeam sysErpMaterialSysTechnicalTeam); |
|||
} |
|||
|
@ -0,0 +1,39 @@ |
|||
package com.ruoyi.system.service.impl; |
|||
|
|||
import com.ruoyi.system.domain.SysErpMaterialSysTechnicalTeam; |
|||
import com.ruoyi.system.mapper.SysErpMaterialSysTechnicalTeamMapper; |
|||
import com.ruoyi.system.service.ISysErpMaterialSysTechnicalTeamService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Service |
|||
public class ISysErpMaterialSysTechnicalTeamIpml implements ISysErpMaterialSysTechnicalTeamService { |
|||
@Autowired |
|||
private SysErpMaterialSysTechnicalTeamMapper sysErpMaterialSysTechnicalTeamMapper; |
|||
@Override |
|||
public List<SysErpMaterialSysTechnicalTeam> selectSysMaterialSysTechnicalTeamList(SysErpMaterialSysTechnicalTeam sysErpMaterialSysTechnicalTeam) { |
|||
return sysErpMaterialSysTechnicalTeamMapper.selectSysMaterialSysTechnicalTeamList(sysErpMaterialSysTechnicalTeam); |
|||
} |
|||
|
|||
@Override |
|||
public SysErpMaterialSysTechnicalTeam selectSysMaterialSysTechnicalTeamListById(Long iconId) { |
|||
return sysErpMaterialSysTechnicalTeamMapper.selectSysMaterialSysTechnicalTeamListById(iconId); |
|||
} |
|||
|
|||
@Override |
|||
public Integer insertSysErpMaterialSysTechnicalTeam(SysErpMaterialSysTechnicalTeam sysErpMaterialSysTechnicalTeam) { |
|||
return sysErpMaterialSysTechnicalTeamMapper.insertSysErpMaterialSysTechnicalTeam(sysErpMaterialSysTechnicalTeam); |
|||
} |
|||
|
|||
@Override |
|||
public Integer deleteSysErpMaterialSysTechnicalTeam(List<Long> list) { |
|||
return sysErpMaterialSysTechnicalTeamMapper.deleteSysErpMaterialSysTechnicalTeam(list); |
|||
} |
|||
|
|||
@Override |
|||
public Integer updateSysErpMaterialSysTechnicalTeam(SysErpMaterialSysTechnicalTeam sysErpMaterialSysTechnicalTeam) { |
|||
return sysErpMaterialSysTechnicalTeamMapper.updateSysErpMaterialSysTechnicalTeam(sysErpMaterialSysTechnicalTeam); |
|||
} |
|||
} |
@ -0,0 +1,50 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ruoyi.system.mapper.SysErpMaterialSysTechnicalTeamMapper"> |
|||
<resultMap type="SysErpMaterialSysTechnicalTeam" id="SysErpMaterialSysTechnicalTeamResult"> |
|||
<result property="icon_id" column="id" /> |
|||
<result property="materialId" column="material_id" /> |
|||
<result property="technicalTeamIdId" column="technical_team_id" /> |
|||
</resultMap> |
|||
<sql id="selectSysErpMaterialSysTechnicalTeamVo"> |
|||
select icon_id,material_id,technical_team_id from |
|||
sys_erpmaterial_technical |
|||
</sql> |
|||
|
|||
<select id="selectSysErpMaterialSysTechnicalTeamList"> |
|||
<include refid="selectSysErpMaterialSysTechnicalTeamVo"/> |
|||
</select> |
|||
|
|||
<select id="selectSysErpMaterialSysTechnicalTeamByList" parameterType="SysErpMaterialSysTechnicalTeam" resultMap="SysErpMaterialSysTechnicalTeamResult"> |
|||
<include refid="selectSysErpMaterialSysTechnicalTeamVo"/> |
|||
<where> |
|||
<if test="materialId != null"> and material_id = #{materialId}</if> |
|||
<if test="technicalTeamIdId != null"> and technical_team_id = #{technicalTeamIdId}</if> |
|||
</where> |
|||
</select> |
|||
<insert id="insertSysErpMaterialSysTechnicalTeam" useGeneratedKeys="true" keyProperty="iconId"> |
|||
insert into sys_erpmaterial_technical(`material_id`,`technical_team_id`) values (#{materialId},#{technicalTeamId}) |
|||
</insert> |
|||
<delete id="deleteSysErpMaterialSysTechnicalTeam"> |
|||
delete from sys_erpmaterial_technical |
|||
where iconId in |
|||
<foreach collection="list" open="(" separator="," close=")" item="id"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
<update id="updateSysErpMaterialSysTechnicalTeam" parameterType="SysErpMaterialSysTechnicalTeam"> |
|||
update sys_erpmaterial_technical set |
|||
material_id = #{materialId},technical_team_id = #{technicalTeamId} |
|||
where icon_id in |
|||
<foreach collection="list" open="(" separator="," close=")" item="id"> |
|||
#{id} |
|||
</foreach> |
|||
</update> |
|||
<select id="selectSysMaterialSysTechnicalTeamListById" parameterType="Long" resultMap="SysErpMaterialSysTechnicalTeamResult"> |
|||
<include refid="selectSysErpMaterialSysTechnicalTeamVo"/> |
|||
where icon_id = #{id} |
|||
</select> |
|||
|
|||
</mapper> |
Loading…
Reference in new issue