Commit f25bddba by rongkailun

【新增】图片资讯列表添加id

parent abb54dda
package io.office.modules.manage.controller;
import java.util.Arrays;
import java.util.Map;
import java.util.*;
import io.office.modules.manage.entity.MedicalEntity;
import io.office.modules.manage.service.MedicalService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
......@@ -60,9 +55,10 @@ public class MedicalController {
@RequestMapping("/save")
// @RequiresPermissions("manage:medical:save")
public R save(@RequestBody MedicalEntity medical){
medicalService.save(medical);
return R.ok();
medical.setId(UUID.randomUUID().toString());
medical.setInputDate(new Date());
// medicalService.insertMedical(medical);
return R.ok("新增成功!");
}
/**
......@@ -87,4 +83,10 @@ public class MedicalController {
return R.ok();
}
@GetMapping("/getMedicalTypeList")
public R getMedicalTypeList(){
List<Map<String,Object>> list = medicalService.getMedicalTypeList();
return R.ok().put("list",list);
}
}
......@@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.office.modules.manage.entity.MedicalEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* ${comments}
*
......@@ -14,4 +17,7 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface MedicalDao extends BaseMapper<MedicalEntity> {
List<Map<String, Object>> getMedicalTypeList();
}
......@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
/**
......@@ -23,7 +25,7 @@ public class MedicalEntity implements Serializable {
* $column.comments
*/
@TableId
private Integer id;
private String id;
/**
* $column.comments
*/
......@@ -55,10 +57,12 @@ public class MedicalEntity implements Serializable {
/**
* $column.comments
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date releasetime;
/**
* $column.comments
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date implementationtime;
/**
* $column.comments
......@@ -69,4 +73,6 @@ public class MedicalEntity implements Serializable {
*/
private String content;
private Date inputDate;
}
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import io.office.common.utils.PageUtils;
import io.office.modules.manage.entity.MedicalEntity;
import java.util.List;
import java.util.Map;
/**
......@@ -16,5 +17,8 @@ import java.util.Map;
public interface MedicalService extends IService<MedicalEntity> {
PageUtils queryPage(Map<String, Object> params);
List<Map<String, Object>> getMedicalTypeList();
}
......@@ -3,7 +3,10 @@ package io.office.modules.manage.service.impl;
import io.office.modules.manage.dao.MedicalDao;
import io.office.modules.manage.entity.MedicalEntity;
import io.office.modules.manage.service.MedicalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
......@@ -16,6 +19,9 @@ import io.office.common.utils.Query;
@Service("medicalService")
public class MedicalServiceImpl extends ServiceImpl<MedicalDao, MedicalEntity> implements MedicalService {
@Autowired
MedicalDao medicalDao;
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<MedicalEntity> page = this.page(
......@@ -26,4 +32,10 @@ public class MedicalServiceImpl extends ServiceImpl<MedicalDao, MedicalEntity> i
return new PageUtils(page);
}
@Override
public List<Map<String, Object>> getMedicalTypeList() {
List<Map<String, Object>> list = this.medicalDao.getMedicalTypeList();
return list;
}
}
\ No newline at end of file
......@@ -17,7 +17,11 @@
<result property="implementationtime" column="implementationTime"/>
<result property="remarks" column="remarks"/>
<result property="content" column="content"/>
<result property="inputDate" column="inputDate"/>
</resultMap>
<select id="getMedicalTypeList" resultType="java.util.Map">
select * from medical_type t
</select>
</mapper>
\ No newline at end of file
......@@ -25,6 +25,7 @@
<select id="selectPictureList" resultMap="pictureMap" parameterType="io.office.modules.manage.entity.dto.PictureParams">
SELECT
t.pictureID,
t.title,
t.Picture_type,
t.showtime,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment