Compare commits

...

2 Commits

  1. 19
      acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/ExternalController.java
  2. 3
      acupuncture-generator/src/main/resources/mbg.xml
  3. 50
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/HmsWeightHeight.java
  4. 400
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/HmsWeightHeightExample.java
  5. 28
      acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/HmsWeightHeightMapper.java
  6. 8
      acupuncture-system/src/main/java/com/acupuncture/system/service/ExternalService.java
  7. 50
      acupuncture-system/src/main/java/com/acupuncture/system/service/impl/ExternalServiceImpl.java
  8. 175
      acupuncture-system/src/main/resources/mapper/system/HmsWeightHeightMapper.xml

19
acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/ExternalController.java

@ -20,6 +20,7 @@ import com.acupuncture.common.utils.file.FileUtils;
import com.acupuncture.framework.config.ServerConfig; import com.acupuncture.framework.config.ServerConfig;
import com.acupuncture.framework.datasource.DynamicDataSourceContextHolder; import com.acupuncture.framework.datasource.DynamicDataSourceContextHolder;
import com.acupuncture.system.domain.dto.ExternalDto; import com.acupuncture.system.domain.dto.ExternalDto;
import com.acupuncture.system.domain.po.HmsWeightHeight;
import com.acupuncture.system.domain.po.UplReportImage; import com.acupuncture.system.domain.po.UplReportImage;
import com.acupuncture.system.domain.po.UplRtcfInfo; import com.acupuncture.system.domain.po.UplRtcfInfo;
import com.acupuncture.system.domain.vo.ExternalVo; import com.acupuncture.system.domain.vo.ExternalVo;
@ -191,4 +192,22 @@ public class ExternalController {
public JsonResponse<UplReportImage> selectReportByMemberId(@RequestBody @Validated ExternalDto.MemberDto dto){ public JsonResponse<UplReportImage> selectReportByMemberId(@RequestBody @Validated ExternalDto.MemberDto dto){
return JsonResponse.ok(externalService.selectReportByMemberId(dto.getId())); return JsonResponse.ok(externalService.selectReportByMemberId(dto.getId()));
} }
@Anonymous
@ApiOperation("身高体重仪和针灸系统的对接")
@RequestMapping(value = "/api/http/dmh", method = {RequestMethod.GET, RequestMethod.POST})
public JsonResponse<Integer> dmh(@RequestBody String str){
//W:066.5 H:173.5\r\n
log.info("身高体重仪和针灸系统的对接:{}", str);
externalService.dmh(str);
return JsonResponse.ok();
}
@DataSource(DataSourceType.MASTER)
@ApiOperation("查询身高体重")
@PostMapping("/api/http/getWeightHeight")
public JsonResponse<HmsWeightHeight> getWeightHeight(){
return JsonResponse.ok(externalService.getWeightHeight());
}
} }

3
acupuncture-generator/src/main/resources/mbg.xml

@ -80,7 +80,8 @@
<!-- <table tableName="fms_followup_queue" domainObjectName="FmsFollowupQueue" enableDeleteByExample="false"/>--> <!-- <table tableName="fms_followup_queue" domainObjectName="FmsFollowupQueue" enableDeleteByExample="false"/>-->
<!-- <table tableName="fms_followup_task" domainObjectName="FmsFollowupTask" enableDeleteByExample="false"/>--> <!-- <table tableName="fms_followup_task" domainObjectName="FmsFollowupTask" enableDeleteByExample="false"/>-->
<!-- <table tableName="fms_patient_queue_relation" domainObjectName="FmsPatientQueueRelation" enableDeleteByExample="false"/>--> <!-- <table tableName="fms_patient_queue_relation" domainObjectName="FmsPatientQueueRelation" enableDeleteByExample="false"/>-->
<table tableName="pms_patient" domainObjectName="PmsPatient" enableDeleteByExample="false"/> <!-- <table tableName="pms_patient" domainObjectName="PmsPatient" enableDeleteByExample="false"/>-->
<table tableName="hms_weight_height" domainObjectName="HmsWeightHeight" enableDeleteByExample="false"/>
<!-- <table tableName="pms_treatment" domainObjectName="PmsTreatment" enableDeleteByExample="false"/>--> <!-- <table tableName="pms_treatment" domainObjectName="PmsTreatment" enableDeleteByExample="false"/>-->
<!-- <table tableName="pms_treatment_record" domainObjectName="PmsTreatmentRecord" enableDeleteByExample="false"/>--> <!-- <table tableName="pms_treatment_record" domainObjectName="PmsTreatmentRecord" enableDeleteByExample="false"/>-->
<!-- <table tableName="rms_report_type" domainObjectName="RmsReportType" enableDeleteByExample="false"/>--> <!-- <table tableName="rms_report_type" domainObjectName="RmsReportType" enableDeleteByExample="false"/>-->

50
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/HmsWeightHeight.java

@ -0,0 +1,50 @@
package com.acupuncture.system.domain.po;
import java.io.Serializable;
public class HmsWeightHeight implements Serializable {
private Long id;
private String height;
private String weight;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getHeight() {
return height;
}
public void setHeight(String height) {
this.height = height == null ? null : height.trim();
}
public String getWeight() {
return weight;
}
public void setWeight(String weight) {
this.weight = weight == null ? null : weight.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", height=").append(height);
sb.append(", weight=").append(weight);
sb.append("]");
return sb.toString();
}
}

400
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/HmsWeightHeightExample.java

@ -0,0 +1,400 @@
package com.acupuncture.system.domain.po;
import java.util.ArrayList;
import java.util.List;
public class HmsWeightHeightExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public HmsWeightHeightExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andHeightIsNull() {
addCriterion("height is null");
return (Criteria) this;
}
public Criteria andHeightIsNotNull() {
addCriterion("height is not null");
return (Criteria) this;
}
public Criteria andHeightEqualTo(String value) {
addCriterion("height =", value, "height");
return (Criteria) this;
}
public Criteria andHeightNotEqualTo(String value) {
addCriterion("height <>", value, "height");
return (Criteria) this;
}
public Criteria andHeightGreaterThan(String value) {
addCriterion("height >", value, "height");
return (Criteria) this;
}
public Criteria andHeightGreaterThanOrEqualTo(String value) {
addCriterion("height >=", value, "height");
return (Criteria) this;
}
public Criteria andHeightLessThan(String value) {
addCriterion("height <", value, "height");
return (Criteria) this;
}
public Criteria andHeightLessThanOrEqualTo(String value) {
addCriterion("height <=", value, "height");
return (Criteria) this;
}
public Criteria andHeightLike(String value) {
addCriterion("height like", value, "height");
return (Criteria) this;
}
public Criteria andHeightNotLike(String value) {
addCriterion("height not like", value, "height");
return (Criteria) this;
}
public Criteria andHeightIn(List<String> values) {
addCriterion("height in", values, "height");
return (Criteria) this;
}
public Criteria andHeightNotIn(List<String> values) {
addCriterion("height not in", values, "height");
return (Criteria) this;
}
public Criteria andHeightBetween(String value1, String value2) {
addCriterion("height between", value1, value2, "height");
return (Criteria) this;
}
public Criteria andHeightNotBetween(String value1, String value2) {
addCriterion("height not between", value1, value2, "height");
return (Criteria) this;
}
public Criteria andWeightIsNull() {
addCriterion("weight is null");
return (Criteria) this;
}
public Criteria andWeightIsNotNull() {
addCriterion("weight is not null");
return (Criteria) this;
}
public Criteria andWeightEqualTo(String value) {
addCriterion("weight =", value, "weight");
return (Criteria) this;
}
public Criteria andWeightNotEqualTo(String value) {
addCriterion("weight <>", value, "weight");
return (Criteria) this;
}
public Criteria andWeightGreaterThan(String value) {
addCriterion("weight >", value, "weight");
return (Criteria) this;
}
public Criteria andWeightGreaterThanOrEqualTo(String value) {
addCriterion("weight >=", value, "weight");
return (Criteria) this;
}
public Criteria andWeightLessThan(String value) {
addCriterion("weight <", value, "weight");
return (Criteria) this;
}
public Criteria andWeightLessThanOrEqualTo(String value) {
addCriterion("weight <=", value, "weight");
return (Criteria) this;
}
public Criteria andWeightLike(String value) {
addCriterion("weight like", value, "weight");
return (Criteria) this;
}
public Criteria andWeightNotLike(String value) {
addCriterion("weight not like", value, "weight");
return (Criteria) this;
}
public Criteria andWeightIn(List<String> values) {
addCriterion("weight in", values, "weight");
return (Criteria) this;
}
public Criteria andWeightNotIn(List<String> values) {
addCriterion("weight not in", values, "weight");
return (Criteria) this;
}
public Criteria andWeightBetween(String value1, String value2) {
addCriterion("weight between", value1, value2, "weight");
return (Criteria) this;
}
public Criteria andWeightNotBetween(String value1, String value2) {
addCriterion("weight not between", value1, value2, "weight");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

28
acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/HmsWeightHeightMapper.java

@ -0,0 +1,28 @@
package com.acupuncture.system.persist.mapper;
import com.acupuncture.system.domain.po.HmsWeightHeight;
import com.acupuncture.system.domain.po.HmsWeightHeightExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface HmsWeightHeightMapper {
long countByExample(HmsWeightHeightExample example);
int deleteByPrimaryKey(Long id);
int insert(HmsWeightHeight record);
int insertSelective(HmsWeightHeight record);
List<HmsWeightHeight> selectByExample(HmsWeightHeightExample example);
HmsWeightHeight selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") HmsWeightHeight record, @Param("example") HmsWeightHeightExample example);
int updateByExample(@Param("record") HmsWeightHeight record, @Param("example") HmsWeightHeightExample example);
int updateByPrimaryKeySelective(HmsWeightHeight record);
int updateByPrimaryKey(HmsWeightHeight record);
}

8
acupuncture-system/src/main/java/com/acupuncture/system/service/ExternalService.java

@ -1,6 +1,7 @@
package com.acupuncture.system.service; package com.acupuncture.system.service;
import com.acupuncture.system.domain.dto.ExternalDto; import com.acupuncture.system.domain.dto.ExternalDto;
import com.acupuncture.system.domain.po.HmsWeightHeight;
import com.acupuncture.system.domain.po.UplReportImage; import com.acupuncture.system.domain.po.UplReportImage;
import com.acupuncture.system.domain.po.UplRtcfInfo; import com.acupuncture.system.domain.po.UplRtcfInfo;
import com.acupuncture.system.domain.vo.ExternalVo; import com.acupuncture.system.domain.vo.ExternalVo;
@ -54,4 +55,11 @@ public interface ExternalService {
*/ */
UplReportImage selectReportByMemberId(Long id); UplReportImage selectReportByMemberId(Long id);
/**
* DHM人体秤通讯协议对接
* @param str
*/
void dmh(String str);
HmsWeightHeight getWeightHeight();
} }

50
acupuncture-system/src/main/java/com/acupuncture/system/service/impl/ExternalServiceImpl.java

@ -10,15 +10,19 @@ import com.acupuncture.system.domain.po.*;
import com.acupuncture.system.domain.vo.ExternalVo; import com.acupuncture.system.domain.vo.ExternalVo;
import com.acupuncture.system.domain.vo.UplRtcfInfoVo; import com.acupuncture.system.domain.vo.UplRtcfInfoVo;
import com.acupuncture.system.persist.dao.ExternalDao; import com.acupuncture.system.persist.dao.ExternalDao;
import com.acupuncture.system.persist.mapper.HmsWeightHeightMapper;
import com.acupuncture.system.persist.mapper.PmsTreatmentMapper; import com.acupuncture.system.persist.mapper.PmsTreatmentMapper;
import com.acupuncture.system.persist.mapper.UplReportImageMapper; import com.acupuncture.system.persist.mapper.UplReportImageMapper;
import com.acupuncture.system.persist.mapper.UplRtcfInfoMapper; import com.acupuncture.system.persist.mapper.UplRtcfInfoMapper;
import com.acupuncture.system.service.ExternalService; import com.acupuncture.system.service.ExternalService;
import com.github.pagehelper.PageHelper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/** /**
* @Author zzc * @Author zzc
@ -39,6 +43,8 @@ public class ExternalServiceImpl implements ExternalService {
private RedisCache redisCache; private RedisCache redisCache;
@Resource @Resource
private PmsTreatmentMapper pmsTreatmentMapper; private PmsTreatmentMapper pmsTreatmentMapper;
@Resource
private HmsWeightHeightMapper hmsWeightHeightMapper;
@Override @Override
public ExternalVo.Result query(String from, String memberid) { public ExternalVo.Result query(String from, String memberid) {
@ -220,4 +226,48 @@ public class ExternalServiceImpl implements ExternalService {
} }
return new UplReportImage(); return new UplReportImage();
} }
@Override
public void dmh(String str) {
// 1. 去除首尾空格和换行符
String trimmedInput = str.trim();
// 2. 定义正则表达式匹配模式
Pattern pattern = Pattern.compile("W:(\\d+\\.\\d+)\\s+H:(\\d+\\.\\d+)");
Matcher matcher = pattern.matcher(trimmedInput);
// 3. 提取并处理匹配结果
if (matcher.find()) {
String wValue = matcher.group(1); // 提取 W 的数值部分
String hValue = matcher.group(2); // 提取 H 的数值部分
// 转换为 Double(自动忽略前导零)
double width = Double.parseDouble(wValue);
double height = Double.parseDouble(hValue);
HmsWeightHeight hmsWeightHeight = new HmsWeightHeight();
hmsWeightHeight.setHeight(height + "");
hmsWeightHeight.setWeight(width + "");
hmsWeightHeight.setId(IdUtil.getSnowflakeNextId());
hmsWeightHeightMapper.insertSelective(hmsWeightHeight);
// 输出结果(或按需处理)
System.out.println("W: " + width); // 输出: W: 66.5
System.out.println("H: " + height); // 输出: H: 173.5
} else {
System.out.println("未找到有效的 W 或 H 值");
}
}
@Override
public HmsWeightHeight getWeightHeight() {
PageHelper.startPage(1, 1);
HmsWeightHeightExample hmsWeightHeightExample = new HmsWeightHeightExample();
hmsWeightHeightExample.setOrderByClause("id desc");
List<HmsWeightHeight> hmsWeightHeights = hmsWeightHeightMapper.selectByExample(hmsWeightHeightExample);
if (CollectionUtil.isNotEmpty(hmsWeightHeights)) {
return hmsWeightHeights.get(0);
}
return null;
}
} }

175
acupuncture-system/src/main/resources/mapper/system/HmsWeightHeightMapper.xml

@ -0,0 +1,175 @@
<?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.acupuncture.system.persist.mapper.HmsWeightHeightMapper">
<resultMap id="BaseResultMap" type="com.acupuncture.system.domain.po.HmsWeightHeight">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="height" jdbcType="VARCHAR" property="height" />
<result column="weight" jdbcType="VARCHAR" property="weight" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, height, weight
</sql>
<select id="selectByExample" parameterType="com.acupuncture.system.domain.po.HmsWeightHeightExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from hms_weight_height
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from hms_weight_height
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from hms_weight_height
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.acupuncture.system.domain.po.HmsWeightHeight">
insert into hms_weight_height (id, height, weight
)
values (#{id,jdbcType=BIGINT}, #{height,jdbcType=VARCHAR}, #{weight,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.acupuncture.system.domain.po.HmsWeightHeight">
insert into hms_weight_height
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="height != null">
height,
</if>
<if test="weight != null">
weight,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="height != null">
#{height,jdbcType=VARCHAR},
</if>
<if test="weight != null">
#{weight,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.acupuncture.system.domain.po.HmsWeightHeightExample" resultType="java.lang.Long">
select count(*) from hms_weight_height
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update hms_weight_height
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.height != null">
height = #{record.height,jdbcType=VARCHAR},
</if>
<if test="record.weight != null">
weight = #{record.weight,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update hms_weight_height
set id = #{record.id,jdbcType=BIGINT},
height = #{record.height,jdbcType=VARCHAR},
weight = #{record.weight,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.acupuncture.system.domain.po.HmsWeightHeight">
update hms_weight_height
<set>
<if test="height != null">
height = #{height,jdbcType=VARCHAR},
</if>
<if test="weight != null">
weight = #{weight,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.acupuncture.system.domain.po.HmsWeightHeight">
update hms_weight_height
set height = #{height,jdbcType=VARCHAR},
weight = #{weight,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
Loading…
Cancel
Save