| | |
| | | select * from lf.sys_meta; -- delete from lf.sys_meta; |
| | | select * from lf.sys_meta_file; -- delete from lf.sys_meta_file; |
| | | |
| | | |
| | | select * from lf.sys_meta_file a where metaid in (99,100,101) |
| | | |
| | | |
| | | |
| | |
| | | import com.lf.server.entity.ctrl.DownloadReqEntity; |
| | | import com.lf.server.entity.data.DownloadEntity; |
| | | import com.lf.server.entity.data.MetaEntity; |
| | | import com.lf.server.entity.data.MetaFileEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.Md5Helper; |
| | | import com.lf.server.helper.RsaHelper; |
| | |
| | | return fail("密码不符合要求"); |
| | | } |
| | | |
| | | String ids = StringHelper.join(reqEntity.getIds(), ","); |
| | | |
| | | List<MetaFileEntity> list = metaService.selectMetaFiles(reqEntity.getIds()); |
| | | |
| | | return success(true); |
| | | } catch (Exception ex) { |
| | |
| | | package com.lf.server.mapper.data; |
| | | |
| | | import com.lf.server.entity.data.MetaEntity; |
| | | import com.lf.server.entity.data.MetaFileEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | public MetaEntity selectById(int id); |
| | | |
| | | /** |
| | | * 查询元数据文件 |
| | | * |
| | | * @param ids 元数据ID集合 |
| | | * @return 元数据文件集合 |
| | | */ |
| | | public List<MetaFileEntity> selectMetaFiles(List<Integer> ids); |
| | | |
| | | /** |
| | | * 插入一条 |
| | | * |
| | | * @param entity |
| | |
| | | package com.lf.server.service.data; |
| | | |
| | | import com.lf.server.entity.data.MetaEntity; |
| | | import com.lf.server.entity.data.MetaFileEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.mapper.data.MetaMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<MetaFileEntity> selectMetaFiles(List<Integer> ids) { |
| | | return metaMapper.selectMetaFiles(ids); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insert(MetaEntity entity) { |
| | | return metaMapper.insert(entity); |
| | | } |
| | |
| | | from lf.sys_meta a where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectMetaFiles" resultType="com.lf.server.entity.data.MetaFileEntity"> |
| | | select a.* from lf.sys_meta_file a where metaid in |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.data.MetaEntity"> |
| | | <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id"> |
| | | select currval('lf.sys_meta_id_seq'::regclass) as id |