zhangbin пре 1 година
родитељ
комит
9da639a02f

+ 100 - 0
xpgx-service/src/main/java/com/miaxis/ge/domain/GeJu.java

@@ -0,0 +1,100 @@
+package com.miaxis.ge.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+/**
+ * 八字格局对象 ge_ju
+ *
+ * @author miaxis
+ * @date 2023-12-08
+ */
+@Data
+@TableName("ge_ju")
+@ApiModel(value = "GeJu", description = "八字格局对象 ge_ju")
+public class GeJu extends BaseBusinessEntity{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    @TableId(value = "id")
+    @ApiModelProperty(value = "$column.columnComment")
+    private Long id;
+
+    /** 十神 */
+    @Excel(name = "十神")
+    @TableField("shi_shen")
+    @ApiModelProperty(value = "十神")
+    private String shiShen;
+
+    /** 性别:1男 2:女 3:不限 */
+    @Excel(name = "性别:1男 2:女 3:不限")
+    @TableField("sex")
+    @ApiModelProperty(value = "性别:1男 2:女 3:不限")
+    private String sex;
+
+    /** 内容 */
+    @Excel(name = "内容")
+    @TableField("content")
+    @ApiModelProperty(value = "内容")
+    private String content;
+
+    /** 身强 身弱 */
+    @Excel(name = "身强 身弱")
+    @TableField("qr")
+    @ApiModelProperty(value = "身强 身弱")
+    private String qr;
+
+    public void setId(Long id){
+        this.id = id;
+    }
+
+    public Long getId(){
+        return id;
+    }
+    public void setShiShen(String shiShen){
+        this.shiShen = shiShen;
+    }
+
+    public String getShiShen(){
+        return shiShen;
+    }
+    public void setSex(String sex){
+        this.sex = sex;
+    }
+
+    public String getSex(){
+        return sex;
+    }
+    public void setContent(String content){
+        this.content = content;
+    }
+
+    public String getContent(){
+        return content;
+    }
+    public void setQr(String qr){
+        this.qr = qr;
+    }
+
+    public String getQr(){
+        return qr;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("shiShen", getShiShen())
+            .append("sex", getSex())
+            .append("content", getContent())
+            .append("qr", getQr())
+            .toString();
+    }
+}

+ 39 - 0
xpgx-service/src/main/java/com/miaxis/ge/dto/GeJuDto.java

@@ -0,0 +1,39 @@
+package com.miaxis.ge.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 八字格局对象 ge_ju
+ *
+ * @author miaxis
+ * @date 2023-12-08
+ */
+@Data
+@ApiModel(value = "GeJuDto", description = "八字格局对象")
+public class GeJuDto extends BaseBusinessEntity{
+    private static final long serialVersionUID = 1L;
+
+
+    /** 十神 */
+    @ApiModelProperty(value = "十神")
+    private String shiShen;
+
+    /** 性别:1男 2:女 3:不限 */
+    @ApiModelProperty(value = "性别:1男 2:女 3:不限")
+    private String sex;
+
+
+    /** 身强 身弱 */
+    @ApiModelProperty(value = "身强 身弱")
+    private String qr;
+
+}

+ 22 - 0
xpgx-service/src/main/java/com/miaxis/ge/mapper/GeJuMapper.java

@@ -0,0 +1,22 @@
+package com.miaxis.ge.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.miaxis.ge.domain.GeJu;
+
+/**
+ * 八字格局Mapper接口
+ *
+ * @author miaxis
+ * @date 2023-12-08
+ */
+public interface GeJuMapper extends BaseMapper<GeJu> {
+    /**
+     * 查询八字格局列表
+     *
+     * @param geJu 八字格局
+     * @return 八字格局集合
+     */
+    public List<GeJu> selectGeJuList(GeJu geJu);
+
+}

+ 21 - 0
xpgx-service/src/main/java/com/miaxis/ge/service/IGeJuService.java

@@ -0,0 +1,21 @@
+package com.miaxis.ge.service;
+
+import java.util.List;
+import com.miaxis.ge.domain.GeJu;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * 八字格局Service接口
+ *
+ * @author miaxis
+ * @date 2023-12-08
+ */
+public interface IGeJuService extends IService<GeJu>{
+    /**
+     * 查询八字格局列表
+     *
+     * @param geJu 八字格局
+     * @return 八字格局集合
+     */
+    public List<GeJu> selectGeJuList(GeJu geJu);
+}

+ 35 - 0
xpgx-service/src/main/java/com/miaxis/ge/service/impl/GeJuServiceImpl.java

@@ -0,0 +1,35 @@
+package com.miaxis.ge.service.impl;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.apache.commons.lang3.StringUtils;
+import com.miaxis.ge.mapper.GeJuMapper;
+import com.miaxis.ge.domain.GeJu;
+import com.miaxis.ge.service.IGeJuService;
+
+/**
+ * 八字格局Service业务层处理
+ *
+ * @author miaxis
+ * @date 2023-12-08
+ */
+@Service
+public class GeJuServiceImpl extends ServiceImpl<GeJuMapper, GeJu> implements IGeJuService {
+    @Autowired
+    private GeJuMapper geJuMapper;
+
+    /**
+     * 查询八字格局列表
+     *
+     * @param geJu 八字格局
+     * @return 八字格局
+     */
+    @Override
+    public List<GeJu> selectGeJuList(GeJu geJu){
+        return geJuMapper.selectGeJuList(geJu);
+    }
+}

+ 49 - 0
xpgx-service/src/main/resources/mapper/ge/GeJuMapper.xml

@@ -0,0 +1,49 @@
+<?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.miaxis.ge.mapper.GeJuMapper">
+
+    <resultMap type="GeJu" id="GeJuResult">
+        <result property="id"    column="id"    />
+        <result property="shiShen"    column="shi_shen"    />
+        <result property="sex"    column="sex"    />
+        <result property="content"    column="content"    />
+        <result property="qr"    column="qr"    />
+    </resultMap>
+
+    <sql id="selectGeJuVo">
+        select * from ge_ju
+    </sql>
+
+    <select id="selectGeJuList" parameterType="GeJu" resultMap="GeJuResult">
+        <include refid="selectGeJuVo"/>
+        <where>
+            <if test="shiShen != null  and shiShen != ''"> and shi_shen = #{shiShen}</if>
+            <if test="sex != null  and sex != ''"> and sex = #{sex}</if>
+            <if test="content != null  and content != ''"> and content = #{content}</if>
+            <if test="qr != null  and qr != ''"> and qr = #{qr}</if>
+        </where>
+    </select>
+
+
+    <select id="selectGeJuList2" parameterType="com.miaxis.disease.dto.DiseasePartDto" resultMap="GeJuResult">
+        <include refid="selectGeJuVo"/>
+        <where>
+            <if test="qrs != null"> and part in
+                <foreach item="qr" index="index" collection="qrs" open="(" separator="," close=")">
+                    #{qr}
+                </foreach>
+            </if>
+
+            <if test="sex != null and sex != '' "> and sex in
+                <foreach item="s" index="index" collection="sex.split(',')" open="(" separator="," close=")">
+                    #{s}
+                </foreach>
+            </if>
+            <if test="degree != null  and degree != ''"> and degree = #{degree}</if>
+        </where>
+    </select>
+
+
+</mapper>