| @@ -68,7 +68,8 @@ public class WxQuestionController extends BaseController { | |||||
| q.remove(); | q.remove(); | ||||
| } | } | ||||
| } | } | ||||
| if (listQuestion.size() > 0) | |||||
| if (listQuestion.size() > 0 && | |||||
| (new Random().nextInt(100) < listConfig.get(0).getStrength())) | |||||
| return new ResultData(listQuestion.get(new Random().nextInt(listQuestion.size()))); | return new ResultData(listQuestion.get(new Random().nextInt(listQuestion.size()))); | ||||
| } | } | ||||
| } | } | ||||
| @@ -57,18 +57,15 @@ public class WxQuestionConfig implements Serializable { | |||||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateTime") | @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateTime") | ||||
| private Date updateTime; | private Date updateTime; | ||||
| public Integer getStatus() { | |||||
| return status; | |||||
| } | |||||
| public void setStatus(Integer status) { | |||||
| this.status = status; | |||||
| } | |||||
| /**状态**/ | /**状态**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="状态",name="status") | @io.swagger.annotations.ApiModelProperty(value="状态",name="status") | ||||
| private Integer status; | private Integer status; | ||||
| /**状态**/ | |||||
| @io.swagger.annotations.ApiModelProperty(value="调查力度0-100",name="strength") | |||||
| private Integer strength; | |||||
| public String getTenantId() { | public String getTenantId() { | ||||
| return tenantId; | return tenantId; | ||||
| } | } | ||||
| @@ -109,6 +106,22 @@ public class WxQuestionConfig implements Serializable { | |||||
| this.updateTime = updateTime; | this.updateTime = updateTime; | ||||
| } | } | ||||
| public Integer getStatus() { | |||||
| return status; | |||||
| } | |||||
| public void setStatus(Integer status) { | |||||
| this.status = status; | |||||
| } | |||||
| public Integer getStrength() { | |||||
| return strength; | |||||
| } | |||||
| public void setStrength(Integer strength) { | |||||
| this.strength = strength; | |||||
| } | |||||
| @Transient | @Transient | ||||
| protected List<WxQuestion> questions; | protected List<WxQuestion> questions; | ||||
| @@ -9,10 +9,11 @@ | |||||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> | <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> | ||||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> | <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> | ||||
| <result column="status" jdbcType="INTEGER" property="status" /> | <result column="status" jdbcType="INTEGER" property="status" /> | ||||
| <result column="strength" jdbcType="INTEGER" property="strength" /> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`question_list`,`coupon_type_list`,`create_time`,`update_time`,`status` | |||||
| `id`,`tenant_id`,`question_list`,`coupon_type_list`,`create_time`,`update_time`,`status`,`strength` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -46,6 +47,10 @@ | |||||
| and `status` = #{status} | and `status` = #{status} | ||||
| </if> | </if> | ||||
| <if test=" null != strength "> | |||||
| and `strength` = #{strength} | |||||
| </if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||