diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/WxQuestionController.java b/mallinkAdmin/src/main/java/com/iformall/controller/WxQuestionController.java new file mode 100644 index 000000000..8d80b2441 --- /dev/null +++ b/mallinkAdmin/src/main/java/com/iformall/controller/WxQuestionController.java @@ -0,0 +1,84 @@ +package com.iformall.controller; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.iformall.common.ErrorCode; +import com.iformall.common.Result; +import com.iformall.common.ResultData; +import com.iformall.domain.po.WxQuestion; +import com.iformall.domain.po.WxQuestionConfig; +import com.iformall.enums.EnumQuestionConfigStatus; +import com.iformall.service.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.List; + +@RestController +@RequestMapping("wxQuestion") +@Api(description="标签弹窗接口") +public class WxQuestionController extends BaseController { + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Autowired + private WxQuestionService wxQuestionService; + + + @ApiOperation("查寻问券配置") + @GetMapping("getConfig") + public Result getQuestionConfig() { + WxQuestionConfig wxQuestionConfig = new WxQuestionConfig(); + WxQuestion wxQuestion = new WxQuestion(); + wxQuestionConfig.setTenantId(getTenantId()); + wxQuestion.setTenantId(getTenantId()); + + List list = wxQuestionService.findConfigList(wxQuestionConfig); + if (list.size() > 0) { + list.get(0).setQuestions(wxQuestionService.findList(wxQuestion)); + return new ResultData(list.get(0)); + } + wxQuestionConfig.setQuestions(wxQuestionService.findList(wxQuestion)); + wxQuestionConfig.setQuestionList(""); + wxQuestionConfig.setCouponTypeList(""); + wxQuestionConfig.setStatus(EnumQuestionConfigStatus.OFF.getCode()); + return new ResultData(wxQuestionConfig); + } + + + @ApiOperation("设置问券配置") + @GetMapping("setConfig") + public Result setQuestionConfig(@RequestBody WxQuestionConfig wxQuestionConfig) { + if (wxQuestionConfig == null) + return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); + if (wxQuestionConfig.getQuestionList() == null) + return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); + if (wxQuestionConfig.getCouponTypeList() == null) + return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); + + String[] arys1 = wxQuestionConfig.getQuestionList().split(","); + List qs = new ArrayList<>(); + for (int i = 0; i < arys1.length; i++) { + qs.add(Long.parseLong(arys1[i])); + } + String[] arys2 = wxQuestionConfig.getCouponTypeList().split(","); + List ct = new ArrayList<>(); + for (int i = 0; i < arys2.length; i++) { + ct.add(Long.parseLong(arys2[i])); + } + wxQuestionConfig.setQuestionList(JSONObject.toJSONString(qs)); + wxQuestionConfig.setCouponTypeList(JSONObject.toJSONString(ct)); + wxQuestionConfig.setTenantId(getTenantId()); + wxQuestionService.saveOrUpdateConfig(wxQuestionConfig); + return new ResultData(); + } + +} diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxQuestion.java b/mallinkService/src/main/java/com/iformall/domain/po/WxQuestion.java new file mode 100644 index 000000000..f53482415 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxQuestion.java @@ -0,0 +1,120 @@ +package com.iformall.domain.po; + +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Transient; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +@Table(name = "wx_question") +public class WxQuestion implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + protected Long id; + + @Transient + protected List ids; + @Transient + protected String sortColumns; + + public Long getId() { + return id; + } + public void setId(Long id) { + this.id = id; + } + public String getSortColumns() { + return sortColumns; + } + public List getIds() { + return ids; + } + public void setIds(List ids) { + this.ids = ids; + } + + + /**租户ID**/ + @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") + private String tenantId; + /**问题**/ + @io.swagger.annotations.ApiModelProperty(value="问题内容",name="content") + private String content; + + public String getTenantId() { + return tenantId; + } + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public enum Field + { + Id_ASC("`id` ASC"),Id_DESC("`id` DESC") + ,Name_ASC("`tenant_id` ASC"),Name_DESC("`tenant_id` DESC") + ,GroupId_ASC("`content` ASC"),GroupId_DESC("`content` DESC") + ; + private String value; + Field(String value){ + this.value = value; + } + public String getValue() { + return value; + } + public void setCol(String value) { + this.value = value; + } + @Override + public String toString() { + return this.getValue(); + } + } + + public void setSortColumns(WxQuestion.Field... fields) + { + if (fields == null || fields.length == 0) { + return; + } + for (int k = 0; k < fields.length; k++) { + if (fields[k] == null) { + return; + } + } + StringBuilder sb = new StringBuilder(fields[0].toString()); + for (int k = 1; k < fields.length; k++) { + sb.append(","); + sb.append(fields[k].toString()); + } + + this.sortColumns = sb.toString(); + + } + + public void setSortColumns(String sortColumns) + { + if (sortColumns == null || "".equals(sortColumns.trim())) { + return; + } + if (sortColumns.contains(",")) { + String[] cols = sortColumns.split(","); + List fList = new ArrayList(); + for (int k = 0; k < cols.length; k++) { + fList.add(Field.valueOf(cols[k])); + } + this.setSortColumns(fList.toArray(new Field[fList.size()])); + } else { + this.setSortColumns(Field.valueOf(sortColumns)); + } + } +} diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxQuestionConfig.java b/mallinkService/src/main/java/com/iformall/domain/po/WxQuestionConfig.java new file mode 100644 index 000000000..8098d13da --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxQuestionConfig.java @@ -0,0 +1,183 @@ +package com.iformall.domain.po; + +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Transient; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +@Table(name = "wx_question_config") +public class WxQuestionConfig implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + protected Long id; + + @Transient + protected List ids; + @Transient + protected String sortColumns; + + public Long getId() { + return id; + } + public void setId(Long id) { + this.id = id; + } + public String getSortColumns() { + return sortColumns; + } + public List getIds() { + return ids; + } + public void setIds(List ids) { + this.ids = ids; + } + + + /**租户ID**/ + @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") + private String tenantId; + + /**问题列表**/ + @io.swagger.annotations.ApiModelProperty(value="问题列表",name="questionList") + private String questionList; + + /**附着卡券列表**/ + @io.swagger.annotations.ApiModelProperty(value="附着卡券列表",name="couponTypeList") + private String couponTypeList; + + /**创建时间**/ + @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createTime") + private Date createTime; + + /**更新时间**/ + @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateTime") + private Date updateTime; + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + /**状态**/ + @io.swagger.annotations.ApiModelProperty(value="状态",name="status") + private Integer status; + + public String getTenantId() { + return tenantId; + } + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + public String getQuestionList() { + return questionList; + } + + public void setQuestionList(String questionList) { + this.questionList = questionList; + } + + public String getCouponTypeList() { + return couponTypeList; + } + + public void setCouponTypeList(String couponTypeList) { + this.couponTypeList = couponTypeList; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + + @Transient + protected List questions; + + public List getQuestions() { + return questions; + } + + public void setQuestions(List questions) { + this.questions = questions; + } + + public enum Field + { + Id_ASC("`id` ASC"),Id_DESC("`id` DESC") + ,Name_ASC("`tenant_id` ASC"),Name_DESC("`tenant_id` DESC") + ,CreateTime_ASC("`create_time` ASC"),CreateTime_DESC("`create_time` DESC") + ,UpdateTIme_ASC("`update_time` ASC"),UpdateTIme_DESC("`update_time` DESC") + ; + private String value; + Field(String value){ + this.value = value; + } + public String getValue() { + return value; + } + public void setCol(String value) { + this.value = value; + } + @Override + public String toString() { + return this.getValue(); + } + } + + public void setSortColumns(WxQuestionConfig.Field... fields) + { + if (fields == null || fields.length == 0) { + return; + } + for (int k = 0; k < fields.length; k++) { + if (fields[k] == null) { + return; + } + } + StringBuilder sb = new StringBuilder(fields[0].toString()); + for (int k = 1; k < fields.length; k++) { + sb.append(","); + sb.append(fields[k].toString()); + } + + this.sortColumns = sb.toString(); + + } + + public void setSortColumns(String sortColumns) + { + if (sortColumns == null || "".equals(sortColumns.trim())) { + return; + } + if (sortColumns.contains(",")) { + String[] cols = sortColumns.split(","); + List fList = new ArrayList(); + for (int k = 0; k < cols.length; k++) { + fList.add(Field.valueOf(cols[k])); + } + this.setSortColumns(fList.toArray(new Field[fList.size()])); + } else { + this.setSortColumns(Field.valueOf(sortColumns)); + } + } +} diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxQuestionLog.java b/mallinkService/src/main/java/com/iformall/domain/po/WxQuestionLog.java new file mode 100644 index 000000000..5ee16d11f --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxQuestionLog.java @@ -0,0 +1,171 @@ +package com.iformall.domain.po; + +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Transient; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +@Table(name = "wx_question_log") +public class WxQuestionLog implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + protected Long id; + + @Transient + protected List ids; + @Transient + protected String sortColumns; + + public Long getId() { + return id; + } + public void setId(Long id) { + this.id = id; + } + public String getSortColumns() { + return sortColumns; + } + public List getIds() { + return ids; + } + public void setIds(List ids) { + this.ids = ids; + } + + + /**租户ID**/ + @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") + private String tenantId; + /**用户ID**/ + @io.swagger.annotations.ApiModelProperty(value="用户ID",name="userId") + private Long userId; + /**问题ID**/ + @io.swagger.annotations.ApiModelProperty(value="问题ID",name="questionId") + private Long questionId; + /**答案**/ + @io.swagger.annotations.ApiModelProperty(value="答案",name="answer") + private String answer; + /**创建时间**/ + @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createTime") + private Date createTime; + /**更新时间**/ + @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateTime") + private Date updateTime; + + + public String getTenantId() { + return tenantId; + } + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getQuestionId() { + return questionId; + } + + public void setQuestionId(Long questionId) { + this.questionId = questionId; + } + + public String getAnswer() { + return answer; + } + + public void setAnswer(String answer) { + this.answer = answer; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public enum Field + { + Id_ASC("`id` ASC"),Id_DESC("`id` DESC") + ,TenantID_ASC("`tenant_id` ASC"),TenantID_DESC("`tenant_id` DESC") + ,UserId_ASC("`user_id` ASC"),UserId_DESC("`user_id` DESC") + ,QuestionId_ASC("`question_id` ASC"),QuestionId_DESC("`question_id` DESC") + ,Answer_ASC("`answer` ASC"),Answer_DESC("`answer` DESC") + ,CreateTime_ASC("`create_time` ASC"),CreateTime_DESC("`create_time` DESC") + ,UpdateTIme_ASC("`update_time` ASC"),UpdateTIme_DESC("`update_time` DESC") + ; + private String value; + Field(String value){ + this.value = value; + } + public String getValue() { + return value; + } + public void setCol(String value) { + this.value = value; + } + @Override + public String toString() { + return this.getValue(); + } + } + + public void setSortColumns(WxQuestionLog.Field... fields) + { + if (fields == null || fields.length == 0) { + return; + } + for (int k = 0; k < fields.length; k++) { + if (fields[k] == null) { + return; + } + } + StringBuilder sb = new StringBuilder(fields[0].toString()); + for (int k = 1; k < fields.length; k++) { + sb.append(","); + sb.append(fields[k].toString()); + } + + this.sortColumns = sb.toString(); + + } + + public void setSortColumns(String sortColumns) + { + if (sortColumns == null || "".equals(sortColumns.trim())) { + return; + } + if (sortColumns.contains(",")) { + String[] cols = sortColumns.split(","); + List fList = new ArrayList(); + for (int k = 0; k < cols.length; k++) { + fList.add(Field.valueOf(cols[k])); + } + this.setSortColumns(fList.toArray(new Field[fList.size()])); + } else { + this.setSortColumns(Field.valueOf(sortColumns)); + } + } +} diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumQuestionConfigStatus.java b/mallinkService/src/main/java/com/iformall/enums/EnumQuestionConfigStatus.java new file mode 100644 index 000000000..bd3d71878 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumQuestionConfigStatus.java @@ -0,0 +1,37 @@ +package com.iformall.enums; + +/** + * Created by Stormeye on 2018/08/09. + */ +public enum EnumQuestionConfigStatus { + + // 1、开启 2:关闭 + ON(0,"开启"), + OFF(1, "关闭") + ; + + public static EnumQuestionConfigStatus getEnum(Integer code) { + for (EnumQuestionConfigStatus value : values()) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } + + private Integer code; + private String message; + + EnumQuestionConfigStatus(Integer code, String message) { + this.code = code; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getMessage() { + return message; + } +} diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxQuestionConfigMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxQuestionConfigMapper.java new file mode 100644 index 000000000..a11cb58b2 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/mapper/WxQuestionConfigMapper.java @@ -0,0 +1,11 @@ +package com.iformall.mapper; + +import com.iformall.common.CommonMapper; +import com.iformall.domain.po.WxQuestionConfig; + +import java.util.List; + +public interface WxQuestionConfigMapper extends CommonMapper { + + List findList(WxQuestionConfig wxQuestionConfig); +} diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxQuestionLogMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxQuestionLogMapper.java new file mode 100644 index 000000000..ace1e33b5 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/mapper/WxQuestionLogMapper.java @@ -0,0 +1,11 @@ +package com.iformall.mapper; + +import com.iformall.common.CommonMapper; +import com.iformall.domain.po.WxQuestionLog; + +import java.util.List; + +public interface WxQuestionLogMapper extends CommonMapper { + + List findList(WxQuestionLog wxQuestionLog); +} diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxQuestionMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxQuestionMapper.java new file mode 100644 index 000000000..f81c79e0a --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/mapper/WxQuestionMapper.java @@ -0,0 +1,11 @@ +package com.iformall.mapper; + +import com.iformall.common.CommonMapper; +import com.iformall.domain.po.WxQuestion; + +import java.util.List; + +public interface WxQuestionMapper extends CommonMapper { + + List findList(WxQuestion wxQuestion); +} diff --git a/mallinkService/src/main/java/com/iformall/service/WxQuestionService.java b/mallinkService/src/main/java/com/iformall/service/WxQuestionService.java new file mode 100644 index 000000000..2f2fe7cf5 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/service/WxQuestionService.java @@ -0,0 +1,50 @@ +package com.iformall.service; + +import com.github.pagehelper.PageInfo; +import com.iformall.domain.po.WxQuestion; +import com.iformall.domain.po.WxQuestionConfig; + +import java.util.List; + +public interface WxQuestionService { + + /** + * 根据实体查询分页列表 + * + * @param record + * @param offset + * @param limit + * @return + */ + PageInfo listAsPage(WxQuestion record, Integer pageIndex, Integer pageSize); + + /** + * 根据Id获得实体 + * + * @param id + * @return + */ + WxQuestion getById(Long id); + + /** + * 保存或更新实体 + * + * @param record + */ + void saveOrUpdate(WxQuestion record); + + /** + * 根据Id删除实体 + * + * @param id + */ + void deleteById(Long id); + + List findList(WxQuestion wxTags); + + + + List findConfigList(WxQuestionConfig wxQuestionConfig); + + void saveOrUpdateConfig(WxQuestionConfig record); +} diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxGameServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxGameServiceImpl.java index ad4bf393f..cdd7c9fef 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxGameServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxGameServiceImpl.java @@ -27,6 +27,8 @@ import com.iformall.service.WxGameService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.iformall.common.IdWorker; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; @Service public class WxGameServiceImpl implements WxGameService { @@ -121,6 +123,7 @@ public class WxGameServiceImpl implements WxGameService { return game; } + @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) @Override public void saveOrUpdate(WxGame record) { if (record.getId() == null) { diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxQuestionServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxQuestionServiceImpl.java new file mode 100644 index 000000000..3ee01dfe2 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxQuestionServiceImpl.java @@ -0,0 +1,80 @@ +package com.iformall.service.impl; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.iformall.common.IdWorker; +import com.iformall.domain.po.WxQuestion; +import com.iformall.domain.po.WxQuestionConfig; +import com.iformall.mapper.WxQuestionConfigMapper; +import com.iformall.mapper.WxQuestionLogMapper; +import com.iformall.mapper.WxQuestionMapper; +import com.iformall.service.WxQuestionService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class WxQuestionServiceImpl implements WxQuestionService { + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Autowired + WxQuestionMapper wxQuestionMapper; + + @Autowired + WxQuestionConfigMapper wxQuestionConfigMapper; + + @Autowired + WxQuestionLogMapper wxQuestionLogMapper; + + @Override + public PageInfo listAsPage(WxQuestion record, Integer pageIndex, Integer pageSize) { + return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxQuestionMapper.findList(record)); + } + + @Override + public WxQuestion getById(Long id) { + return wxQuestionMapper.selectByPrimaryKey(id); + } + + @Override + public void saveOrUpdate(WxQuestion record) { + if (record.getId() == null) { + //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); + final IdWorker idWorker = IdWorker.get(); + record.setId(idWorker.nextId()); + wxQuestionMapper.insertSelective(record); + } else { + wxQuestionMapper.updateByPrimaryKeySelective(record); + } + } + + @Override + public void deleteById(Long id) { + wxQuestionMapper.deleteByPrimaryKey(id); + } + + @Override + public List findList(WxQuestion wxQuestion) { + return wxQuestionMapper.findList(wxQuestion); + } + + @Override + public List findConfigList(WxQuestionConfig wxQuestionConfig) { + return wxQuestionConfigMapper.findList(wxQuestionConfig); + } + + @Override + public void saveOrUpdateConfig(WxQuestionConfig record) { + if (record.getId() == null) { + final IdWorker idWorker = IdWorker.get(); + record.setId(idWorker.nextId()); + wxQuestionConfigMapper.insertSelective(record); + } else { + wxQuestionConfigMapper.updateByPrimaryKeySelective(record); + } + } + +} diff --git a/mallinkService/src/main/resources/mapper/WxQuestionConfigMapper.xml b/mallinkService/src/main/resources/mapper/WxQuestionConfigMapper.xml new file mode 100644 index 000000000..80d7950d7 --- /dev/null +++ b/mallinkService/src/main/resources/mapper/WxQuestionConfigMapper.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + `id`,`tenant_id`,`question_list`,`coupon_type_list`,`create_time`,`update_time`,`status` + + + + where 1 = 1 + + + and `id` = #{id} + + + + and `tenant_id` = #{tenantId} + + + + and JSON_CONTAINS(`question_list`->'$',JSON_ARRAY(#{questionList})) + + + + and JSON_CONTAINS(`coupon_type_list`->'$',JSON_ARRAY(#{couponTypeList})) + + + + and `create_time` = #{createTime} + + + + and `update_time` = #{updateTime} + + + + and `status` = #{status} + + + + and id in + + #{idItem} + + + order by ${sortColumns} + + + + + diff --git a/mallinkService/src/main/resources/mapper/WxQuestionLogMapper.xml b/mallinkService/src/main/resources/mapper/WxQuestionLogMapper.xml new file mode 100644 index 000000000..d1c5508f2 --- /dev/null +++ b/mallinkService/src/main/resources/mapper/WxQuestionLogMapper.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + `id`,`tenant_id`,`user_id`,`question_id`,`answer`,`create_time`,`update_time` + + + + where 1 = 1 + + + and `id` = #{id} + + + + and `tenant_id` = #{tenantId} + + + + and `user_id` = #{userId} + + + + and `question_id` = #{questionId} + + + + and `tenant_id` = #{tenantId} + + + + and `answer` = #{answer} + + + + and `create_time` = #{createTime} + + + + and `update_time` = #{updateTime} + + + + + and id in + + #{idItem} + + + order by ${sortColumns} + + + + + diff --git a/mallinkService/src/main/resources/mapper/WxQuestionMapper.xml b/mallinkService/src/main/resources/mapper/WxQuestionMapper.xml new file mode 100644 index 000000000..d51f066fc --- /dev/null +++ b/mallinkService/src/main/resources/mapper/WxQuestionMapper.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + `id`,`tenant_id`,`content` + + + + where 1 = 1 + + + and `id` = #{id} + + + + and `tenant_id` = #{tenantId} + + + + and `content` = #{content} + + + + + and id in + + #{idItem} + + + order by ${sortColumns} + + + + +