Commit ff86f8c2 by XiaHou

云应用相关的表

parent 3dbcd483
...@@ -2,7 +2,7 @@ package com.hwstudio.antaile.controller; ...@@ -2,7 +2,7 @@ package com.hwstudio.antaile.controller;
import com.hwstudio.antaile.dto.*; import com.hwstudio.antaile.dto.*;
import com.hwstudio.antaile.entity.AtlTime; import com.hwstudio.antaile.entity.AtlTime;
import com.hwstudio.antaile.queryparam.QueryReleaseArticleParam; import com.hwstudio.antaile.queryparam.QueryAtlTimeByBlessIdAndIdxParam;
import com.hwstudio.antaile.service.*; import com.hwstudio.antaile.service.*;
import com.hwstudio.antaile.utils.JsonResult; import com.hwstudio.antaile.utils.JsonResult;
import com.hwstudio.antaile.vo.*; import com.hwstudio.antaile.vo.*;
...@@ -579,4 +579,10 @@ public class AtlTimeController extends BaseController { ...@@ -579,4 +579,10 @@ public class AtlTimeController extends BaseController {
return this.atlTimeService.selectAtlTimeCountMap(userId); return this.atlTimeService.selectAtlTimeCountMap(userId);
} }
@ApiOperation("根据福位id和福位格idxs查询多个时光纪信息")
@RequestMapping(value = "/selectAtlTimeInfoByBlessIdAndIdx", method = RequestMethod.GET)
public JsonResult<List<AtlTimeDTO>> selectAtlTimeInfoByBlessIdAndIdx(@ModelAttribute QueryAtlTimeByBlessIdAndIdxParam queryAtlTimeByBlessIdAndIdxParam) {
return this.atlTimeService.selectAtlTimeInfoByBlessIdAndIdx(queryAtlTimeByBlessIdAndIdxParam);
}
} }
...@@ -24,6 +24,7 @@ import java.util.List; ...@@ -24,6 +24,7 @@ import java.util.List;
* @Version 1.0 * @Version 1.0
*/ */
@RestController @RestController
@CrossOrigin(value = "*", maxAge = 3600)
@RequestMapping(value = "/atlTimeMessage") @RequestMapping(value = "/atlTimeMessage")
@Api(tags = "时光纪留言相关接口") @Api(tags = "时光纪留言相关接口")
public class AtlTimeMessageController extends BaseController{ public class AtlTimeMessageController extends BaseController{
......
...@@ -56,4 +56,9 @@ public class AtlTimeArticleDetailsDto { ...@@ -56,4 +56,9 @@ public class AtlTimeArticleDetailsDto {
@ApiModelProperty(value="创建时间") @ApiModelProperty(value="创建时间")
private String createDate; private String createDate;
@ApiModelProperty(value = "时光纪名称")
private String timeName;
@ApiModelProperty(value = "作者名称")
private String authorName;
} }
package com.hwstudio.antaile.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author xh
* @Date 2021/6/28
* description:
*/
@Data
public class AtlTimeDTO implements Serializable {
@ApiModelProperty(value = "时光纪id")
private Long id;
@ApiModelProperty(value = "时光纪名称")
private String name;
@ApiModelProperty(value = "关于谁")
private String aboutName;
@ApiModelProperty(value = "关联的福位ID(ERP库osh_user_bless_using表bless_id字段)")
private Long blessId;
@ApiModelProperty(value = "关联的福位格ID(ERP库osh_user_bless_using表bless_idx字段)")
private Integer blessIdx;
@ApiModelProperty(value = "形象照")
private String imageUrl;
}
package com.hwstudio.antaile.entity; package com.hwstudio.antaile.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
...@@ -37,4 +38,8 @@ public class AtlTime { ...@@ -37,4 +38,8 @@ public class AtlTime {
private Long likeCount; private Long likeCount;
private Long autobiographyId; private Long autobiographyId;
@ApiModelProperty(value = "关联的福位ID(ERP库osh_user_bless_using表bless_id字段)")
private Long blessId;
@ApiModelProperty(value = "关联的福位格ID(ERP库osh_user_bless_using表bless_idx字段)")
private Integer blessIdx;
} }
\ No newline at end of file
package com.hwstudio.antaile.entity; package com.hwstudio.antaile.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
...@@ -37,4 +38,5 @@ public class AtlTimeArticle { ...@@ -37,4 +38,5 @@ public class AtlTimeArticle {
private Integer collection; private Integer collection;
private Double audioDuration; private Double audioDuration;
} }
\ No newline at end of file
package com.hwstudio.antaile.entity; package com.hwstudio.antaile.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
...@@ -27,4 +28,9 @@ public class AtlTimeArticleFile { ...@@ -27,4 +28,9 @@ public class AtlTimeArticleFile {
private Double audioDuration; private Double audioDuration;
private String desc; private String desc;
@ApiModelProperty(value = "文件时间")
private Date fileDate;
@ApiModelProperty(value = "标题")
private String title;
} }
\ No newline at end of file
...@@ -111,8 +111,18 @@ public interface AtlTimeMapper { ...@@ -111,8 +111,18 @@ public interface AtlTimeMapper {
/** /**
* 统计用户下时光纪所有的阅读量 * 统计用户下时光纪所有的阅读量
*
* @param userId * @param userId
* @return * @return
*/ */
Long selectAtlTimeReadCountByUserId(Long userId); Long selectAtlTimeReadCountByUserId(Long userId);
/**
* 根据福位id 和 idx查询时光纪数据
*
* @param blessId
* @param blessIdx
* @return
*/
AtlTimeDTO selectAtlTimeInfoByBlessIdAndIdx(@Param("blessId") Long blessId, @Param("blessIdx") Integer blessIdx);
} }
\ No newline at end of file
package com.hwstudio.antaile.mbg.mapper;
import com.hwstudio.antaile.mbg.po.AtlAppAlioss;
import com.hwstudio.antaile.mbg.po.AtlAppAliossExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface AtlAppAliossMapper {
long countByExample(AtlAppAliossExample example);
int deleteByExample(AtlAppAliossExample example);
int deleteByPrimaryKey(Long id);
int insert(AtlAppAlioss record);
int insertSelective(AtlAppAlioss record);
List<AtlAppAlioss> selectByExample(AtlAppAliossExample example);
AtlAppAlioss selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") AtlAppAlioss record, @Param("example") AtlAppAliossExample example);
int updateByExample(@Param("record") AtlAppAlioss record, @Param("example") AtlAppAliossExample example);
int updateByPrimaryKeySelective(AtlAppAlioss record);
int updateByPrimaryKey(AtlAppAlioss record);
}
\ No newline at end of file
package com.hwstudio.antaile.mbg.mapper;
import com.hwstudio.antaile.mbg.po.AtlAppstoreCats;
import com.hwstudio.antaile.mbg.po.AtlAppstoreCatsExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface AtlAppstoreCatsMapper {
long countByExample(AtlAppstoreCatsExample example);
int deleteByExample(AtlAppstoreCatsExample example);
int deleteByPrimaryKey(Long id);
int insert(AtlAppstoreCats record);
int insertSelective(AtlAppstoreCats record);
List<AtlAppstoreCats> selectByExample(AtlAppstoreCatsExample example);
AtlAppstoreCats selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") AtlAppstoreCats record, @Param("example") AtlAppstoreCatsExample example);
int updateByExample(@Param("record") AtlAppstoreCats record, @Param("example") AtlAppstoreCatsExample example);
int updateByPrimaryKeySelective(AtlAppstoreCats record);
int updateByPrimaryKey(AtlAppstoreCats record);
}
\ No newline at end of file
package com.hwstudio.antaile.mbg.mapper;
import com.hwstudio.antaile.mbg.po.AtlAppstore;
import com.hwstudio.antaile.mbg.po.AtlAppstoreExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface AtlAppstoreMapper {
long countByExample(AtlAppstoreExample example);
int deleteByExample(AtlAppstoreExample example);
int deleteByPrimaryKey(Long id);
int insert(AtlAppstore record);
int insertSelective(AtlAppstore record);
List<AtlAppstore> selectByExampleWithBLOBs(AtlAppstoreExample example);
List<AtlAppstore> selectByExample(AtlAppstoreExample example);
AtlAppstore selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") AtlAppstore record, @Param("example") AtlAppstoreExample example);
int updateByExampleWithBLOBs(@Param("record") AtlAppstore record, @Param("example") AtlAppstoreExample example);
int updateByExample(@Param("record") AtlAppstore record, @Param("example") AtlAppstoreExample example);
int updateByPrimaryKeySelective(AtlAppstore record);
int updateByPrimaryKeyWithBLOBs(AtlAppstore record);
int updateByPrimaryKey(AtlAppstore record);
}
\ No newline at end of file
package com.hwstudio.antaile.mbg.mapper;
import com.hwstudio.antaile.mbg.po.AtlAppstoreOrder;
import com.hwstudio.antaile.mbg.po.AtlAppstoreOrderExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface AtlAppstoreOrderMapper {
long countByExample(AtlAppstoreOrderExample example);
int deleteByExample(AtlAppstoreOrderExample example);
int deleteByPrimaryKey(Long id);
int insert(AtlAppstoreOrder record);
int insertSelective(AtlAppstoreOrder record);
List<AtlAppstoreOrder> selectByExample(AtlAppstoreOrderExample example);
AtlAppstoreOrder selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") AtlAppstoreOrder record, @Param("example") AtlAppstoreOrderExample example);
int updateByExample(@Param("record") AtlAppstoreOrder record, @Param("example") AtlAppstoreOrderExample example);
int updateByPrimaryKeySelective(AtlAppstoreOrder record);
int updateByPrimaryKey(AtlAppstoreOrder record);
}
\ No newline at end of file
package com.hwstudio.antaile.mbg.mapper;
import com.hwstudio.antaile.mbg.po.AtlTimeMenu;
import com.hwstudio.antaile.mbg.po.AtlTimeMenuExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface AtlTimeMenuMapper {
long countByExample(AtlTimeMenuExample example);
int deleteByExample(AtlTimeMenuExample example);
int deleteByPrimaryKey(Long id);
int insert(AtlTimeMenu record);
int insertSelective(AtlTimeMenu record);
List<AtlTimeMenu> selectByExample(AtlTimeMenuExample example);
AtlTimeMenu selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") AtlTimeMenu record, @Param("example") AtlTimeMenuExample example);
int updateByExample(@Param("record") AtlTimeMenu record, @Param("example") AtlTimeMenuExample example);
int updateByPrimaryKeySelective(AtlTimeMenu record);
int updateByPrimaryKey(AtlTimeMenu record);
}
\ No newline at end of file
package com.hwstudio.antaile.mbg.po;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import org.springframework.format.annotation.DateTimeFormat;
@Entity
public class AtlAppAlioss implements Serializable {
@ApiModelProperty(value = "主键")
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
private Long id;
@ApiModelProperty(value = "关联应用分类表id")
private Long catsId;
@ApiModelProperty(value = "关联时光纪id")
private Long timeId;
@ApiModelProperty(value = "oss相关配置AccessKey")
private String accessKeyId;
@ApiModelProperty(value = "oss相关配置AccessKeySecret")
private String accessKeySecret;
@ApiModelProperty(value = "oss相关配置endpoint")
private String endpoint;
@ApiModelProperty(value = "oss相关配置bucket")
private String bucket;
@ApiModelProperty(value = "oss相关配置ossUrl")
private String ossUrl;
@ApiModelProperty(value = "本地服务器是否存储 0否 1是")
private Integer isSaveLocal;
@ApiModelProperty(value = "是否开启 0否 1是")
private Integer isOpen;
@ApiModelProperty(value = "删除标志(0|正常|1删除)")
private Integer isDelete;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@ApiModelProperty(value = "更新日期")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCatsId() {
return catsId;
}
public void setCatsId(Long catsId) {
this.catsId = catsId;
}
public Long getTimeId() {
return timeId;
}
public void setTimeId(Long timeId) {
this.timeId = timeId;
}
public String getAccessKeyId() {
return accessKeyId;
}
public void setAccessKeyId(String accessKeyId) {
this.accessKeyId = accessKeyId;
}
public String getAccessKeySecret() {
return accessKeySecret;
}
public void setAccessKeySecret(String accessKeySecret) {
this.accessKeySecret = accessKeySecret;
}
public String getEndpoint() {
return endpoint;
}
public void setEndpoint(String endpoint) {
this.endpoint = endpoint;
}
public String getBucket() {
return bucket;
}
public void setBucket(String bucket) {
this.bucket = bucket;
}
public String getOssUrl() {
return ossUrl;
}
public void setOssUrl(String ossUrl) {
this.ossUrl = ossUrl;
}
public Integer getIsSaveLocal() {
return isSaveLocal;
}
public void setIsSaveLocal(Integer isSaveLocal) {
this.isSaveLocal = isSaveLocal;
}
public Integer getIsOpen() {
return isOpen;
}
public void setIsOpen(Integer isOpen) {
this.isOpen = isOpen;
}
public Integer getIsDelete() {
return isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
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;
}
@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(", catsId=").append(catsId);
sb.append(", timeId=").append(timeId);
sb.append(", accessKeyId=").append(accessKeyId);
sb.append(", accessKeySecret=").append(accessKeySecret);
sb.append(", endpoint=").append(endpoint);
sb.append(", bucket=").append(bucket);
sb.append(", ossUrl=").append(ossUrl);
sb.append(", isSaveLocal=").append(isSaveLocal);
sb.append(", isOpen=").append(isOpen);
sb.append(", isDelete=").append(isDelete);
sb.append(", remark=").append(remark);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.hwstudio.antaile.mbg.po;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;
import org.springframework.format.annotation.DateTimeFormat;
@Entity
public class AtlAppstore implements Serializable {
@ApiModelProperty(value = "主键")
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
private Long id;
@ApiModelProperty(value = "应用商店分类id")
private Long catsId;
@ApiModelProperty(value = "应用编号")
private String appId;
@ApiModelProperty(value = "应用名称")
private String appName;
@ApiModelProperty(value = "应用介绍")
private String appIntroduce;
@ApiModelProperty(value = "开发者")
private String appDeveloper;
@ApiModelProperty(value = "菜单名")
private String menuName;
@ApiModelProperty(value = "菜单链接")
private String menuUrl;
@ApiModelProperty(value = "菜单其他链接")
private String menuOtherUrl;
@ApiModelProperty(value = "菜单设置链接")
private String menuSetUrl;
@ApiModelProperty(value = "原价")
private BigDecimal appPrice1;
@ApiModelProperty(value = "售价")
private BigDecimal appPrice2;
@ApiModelProperty(value = "销量")
private Long saleNum;
@ApiModelProperty(value = "是否上架(0是|1否)")
private Integer isSale;
@ApiModelProperty(value = "是否推荐(0是|1否)")
private Integer isRecom;
@ApiModelProperty(value = "是否菜单(0是|1否)")
private Integer isMenu;
@ApiModelProperty(value = "是否默认菜单(0是|1否)")
private Integer defaultMenu;
@ApiModelProperty(value = "删除标志(0|正常|1删除)")
private Integer isDelete;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@ApiModelProperty(value = "更新日期")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
@ApiModelProperty(value = "应用相关图片集,多个根据英文逗号分开")
private String appImages;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCatsId() {
return catsId;
}
public void setCatsId(Long catsId) {
this.catsId = catsId;
}
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
public String getAppName() {
return appName;
}
public void setAppName(String appName) {
this.appName = appName;
}
public String getAppIntroduce() {
return appIntroduce;
}
public void setAppIntroduce(String appIntroduce) {
this.appIntroduce = appIntroduce;
}
public String getAppDeveloper() {
return appDeveloper;
}
public void setAppDeveloper(String appDeveloper) {
this.appDeveloper = appDeveloper;
}
public String getMenuName() {
return menuName;
}
public void setMenuName(String menuName) {
this.menuName = menuName;
}
public String getMenuUrl() {
return menuUrl;
}
public void setMenuUrl(String menuUrl) {
this.menuUrl = menuUrl;
}
public String getMenuOtherUrl() {
return menuOtherUrl;
}
public void setMenuOtherUrl(String menuOtherUrl) {
this.menuOtherUrl = menuOtherUrl;
}
public String getMenuSetUrl() {
return menuSetUrl;
}
public void setMenuSetUrl(String menuSetUrl) {
this.menuSetUrl = menuSetUrl;
}
public BigDecimal getAppPrice1() {
return appPrice1;
}
public void setAppPrice1(BigDecimal appPrice1) {
this.appPrice1 = appPrice1;
}
public BigDecimal getAppPrice2() {
return appPrice2;
}
public void setAppPrice2(BigDecimal appPrice2) {
this.appPrice2 = appPrice2;
}
public Long getSaleNum() {
return saleNum;
}
public void setSaleNum(Long saleNum) {
this.saleNum = saleNum;
}
public Integer getIsSale() {
return isSale;
}
public void setIsSale(Integer isSale) {
this.isSale = isSale;
}
public Integer getIsRecom() {
return isRecom;
}
public void setIsRecom(Integer isRecom) {
this.isRecom = isRecom;
}
public Integer getIsMenu() {
return isMenu;
}
public void setIsMenu(Integer isMenu) {
this.isMenu = isMenu;
}
public Integer getDefaultMenu() {
return defaultMenu;
}
public void setDefaultMenu(Integer defaultMenu) {
this.defaultMenu = defaultMenu;
}
public Integer getIsDelete() {
return isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
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 String getAppImages() {
return appImages;
}
public void setAppImages(String appImages) {
this.appImages = appImages;
}
@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(", catsId=").append(catsId);
sb.append(", appId=").append(appId);
sb.append(", appName=").append(appName);
sb.append(", appIntroduce=").append(appIntroduce);
sb.append(", appDeveloper=").append(appDeveloper);
sb.append(", menuName=").append(menuName);
sb.append(", menuUrl=").append(menuUrl);
sb.append(", menuOtherUrl=").append(menuOtherUrl);
sb.append(", menuSetUrl=").append(menuSetUrl);
sb.append(", appPrice1=").append(appPrice1);
sb.append(", appPrice2=").append(appPrice2);
sb.append(", saleNum=").append(saleNum);
sb.append(", isSale=").append(isSale);
sb.append(", isRecom=").append(isRecom);
sb.append(", isMenu=").append(isMenu);
sb.append(", defaultMenu=").append(defaultMenu);
sb.append(", isDelete=").append(isDelete);
sb.append(", remark=").append(remark);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", appImages=").append(appImages);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.hwstudio.antaile.mbg.po;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import org.springframework.format.annotation.DateTimeFormat;
@Entity
public class AtlAppstoreCats implements Serializable {
@ApiModelProperty(value = "主键")
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
private Long id;
@ApiModelProperty(value = "所属模块 0 app板块 1时光纪 2自传书")
private Integer module;
@ApiModelProperty(value = "应用商店分类名称")
private String name;
@ApiModelProperty(value = "状态(是否存在应用商店 0否1是)")
private Integer isShop;
@ApiModelProperty(value = "删除标志(0|正常|1删除)")
private Integer isDelete;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@ApiModelProperty(value = "更新日期")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getModule() {
return module;
}
public void setModule(Integer module) {
this.module = module;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getIsShop() {
return isShop;
}
public void setIsShop(Integer isShop) {
this.isShop = isShop;
}
public Integer getIsDelete() {
return isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
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;
}
@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(", module=").append(module);
sb.append(", name=").append(name);
sb.append(", isShop=").append(isShop);
sb.append(", isDelete=").append(isDelete);
sb.append(", remark=").append(remark);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.hwstudio.antaile.mbg.po;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import org.springframework.format.annotation.DateTimeFormat;
@Entity
public class AtlAppstoreOrder implements Serializable {
@ApiModelProperty(value = "主键")
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
private Long id;
@ApiModelProperty(value = "用户id")
private Long timeId;
@ApiModelProperty(value = "菜单名称")
private String menuName;
@ApiModelProperty(value = "菜单入口url")
private String menuUrl;
@ApiModelProperty(value = "菜单外部url")
private String menuOtherUrl;
@ApiModelProperty(value = "菜单类型: 0展示端")
private Integer menuType;
@ApiModelProperty(value = "是否显示 0隐藏 1显示")
private Integer isShow;
@ApiModelProperty(value = "是否打开 0是 1否")
private Integer isOpen;
@ApiModelProperty(value = "是否安装(0是|1否)")
private Integer isInstall;
@ApiModelProperty(value = "菜单排序:1最大 9999最小 顺序")
private Integer menuSort;
@ApiModelProperty(value = "数据标识 0无效 1有效")
private Integer dataFlag;
@ApiModelProperty(value = "菜单所属应用")
private Long appId;
@ApiModelProperty(value = "删除标志(0|正常|1删除)")
private Integer isDelete;
@ApiModelProperty(value = "菜单备用字段")
private String menuMark;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@ApiModelProperty(value = "更新日期")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getTimeId() {
return timeId;
}
public void setTimeId(Long timeId) {
this.timeId = timeId;
}
public String getMenuName() {
return menuName;
}
public void setMenuName(String menuName) {
this.menuName = menuName;
}
public String getMenuUrl() {
return menuUrl;
}
public void setMenuUrl(String menuUrl) {
this.menuUrl = menuUrl;
}
public String getMenuOtherUrl() {
return menuOtherUrl;
}
public void setMenuOtherUrl(String menuOtherUrl) {
this.menuOtherUrl = menuOtherUrl;
}
public Integer getMenuType() {
return menuType;
}
public void setMenuType(Integer menuType) {
this.menuType = menuType;
}
public Integer getIsShow() {
return isShow;
}
public void setIsShow(Integer isShow) {
this.isShow = isShow;
}
public Integer getIsOpen() {
return isOpen;
}
public void setIsOpen(Integer isOpen) {
this.isOpen = isOpen;
}
public Integer getIsInstall() {
return isInstall;
}
public void setIsInstall(Integer isInstall) {
this.isInstall = isInstall;
}
public Integer getMenuSort() {
return menuSort;
}
public void setMenuSort(Integer menuSort) {
this.menuSort = menuSort;
}
public Integer getDataFlag() {
return dataFlag;
}
public void setDataFlag(Integer dataFlag) {
this.dataFlag = dataFlag;
}
public Long getAppId() {
return appId;
}
public void setAppId(Long appId) {
this.appId = appId;
}
public Integer getIsDelete() {
return isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public String getMenuMark() {
return menuMark;
}
public void setMenuMark(String menuMark) {
this.menuMark = menuMark;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
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;
}
@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(", timeId=").append(timeId);
sb.append(", menuName=").append(menuName);
sb.append(", menuUrl=").append(menuUrl);
sb.append(", menuOtherUrl=").append(menuOtherUrl);
sb.append(", menuType=").append(menuType);
sb.append(", isShow=").append(isShow);
sb.append(", isOpen=").append(isOpen);
sb.append(", isInstall=").append(isInstall);
sb.append(", menuSort=").append(menuSort);
sb.append(", dataFlag=").append(dataFlag);
sb.append(", appId=").append(appId);
sb.append(", isDelete=").append(isDelete);
sb.append(", menuMark=").append(menuMark);
sb.append(", remark=").append(remark);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.hwstudio.antaile.mbg.po;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import org.springframework.format.annotation.DateTimeFormat;
@Entity
public class AtlTimeMenu implements Serializable {
@ApiModelProperty(value = "主键")
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
private Long id;
@ApiModelProperty(value = "用户id")
private Long timeId;
@ApiModelProperty(value = "菜单名称")
private String menuName;
@ApiModelProperty(value = "菜单入口url")
private String menuUrl;
@ApiModelProperty(value = "菜单外部url")
private String menuOtherUrl;
@ApiModelProperty(value = "菜单类型: 0展示端")
private Integer menuType;
@ApiModelProperty(value = "是否显示 0隐藏 1显示")
private Integer isShow;
@ApiModelProperty(value = "是否打开 0是 1否")
private Integer isOpen;
@ApiModelProperty(value = "是否安装(0是|1否)")
private Integer isInstall;
@ApiModelProperty(value = "菜单排序:1最大 9999最小 顺序")
private Integer menuSort;
@ApiModelProperty(value = "数据标识 0无效 1有效")
private Integer dataFlag;
@ApiModelProperty(value = "菜单所属应用")
private Long appId;
@ApiModelProperty(value = "删除标志(0|正常|1删除)")
private Integer isDelete;
@ApiModelProperty(value = "菜单备用字段")
private String menuMark;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@ApiModelProperty(value = "更新日期")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getTimeId() {
return timeId;
}
public void setTimeId(Long timeId) {
this.timeId = timeId;
}
public String getMenuName() {
return menuName;
}
public void setMenuName(String menuName) {
this.menuName = menuName;
}
public String getMenuUrl() {
return menuUrl;
}
public void setMenuUrl(String menuUrl) {
this.menuUrl = menuUrl;
}
public String getMenuOtherUrl() {
return menuOtherUrl;
}
public void setMenuOtherUrl(String menuOtherUrl) {
this.menuOtherUrl = menuOtherUrl;
}
public Integer getMenuType() {
return menuType;
}
public void setMenuType(Integer menuType) {
this.menuType = menuType;
}
public Integer getIsShow() {
return isShow;
}
public void setIsShow(Integer isShow) {
this.isShow = isShow;
}
public Integer getIsOpen() {
return isOpen;
}
public void setIsOpen(Integer isOpen) {
this.isOpen = isOpen;
}
public Integer getIsInstall() {
return isInstall;
}
public void setIsInstall(Integer isInstall) {
this.isInstall = isInstall;
}
public Integer getMenuSort() {
return menuSort;
}
public void setMenuSort(Integer menuSort) {
this.menuSort = menuSort;
}
public Integer getDataFlag() {
return dataFlag;
}
public void setDataFlag(Integer dataFlag) {
this.dataFlag = dataFlag;
}
public Long getAppId() {
return appId;
}
public void setAppId(Long appId) {
this.appId = appId;
}
public Integer getIsDelete() {
return isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public String getMenuMark() {
return menuMark;
}
public void setMenuMark(String menuMark) {
this.menuMark = menuMark;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
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;
}
@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(", timeId=").append(timeId);
sb.append(", menuName=").append(menuName);
sb.append(", menuUrl=").append(menuUrl);
sb.append(", menuOtherUrl=").append(menuOtherUrl);
sb.append(", menuType=").append(menuType);
sb.append(", isShow=").append(isShow);
sb.append(", isOpen=").append(isOpen);
sb.append(", isInstall=").append(isInstall);
sb.append(", menuSort=").append(menuSort);
sb.append(", dataFlag=").append(dataFlag);
sb.append(", appId=").append(appId);
sb.append(", isDelete=").append(isDelete);
sb.append(", menuMark=").append(menuMark);
sb.append(", remark=").append(remark);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.hwstudio.antaile.queryparam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author xh
* @Date 2021/6/28
* description:
*/
@Data
public class QueryAtlTimeByBlessIdAndIdxParam implements Serializable {
@ApiModelProperty(value = "福位id")
private Long blessId;
@ApiModelProperty(value = "福位格ids,多个idx用英文逗号隔开 :1,2,3...")
private String blessIdxs;
}
...@@ -208,6 +208,8 @@ public class AtlTimeArticleServie { ...@@ -208,6 +208,8 @@ public class AtlTimeArticleServie {
atlTimeArticleFile.setDesc(atlTimeArticle.getContent()); atlTimeArticleFile.setDesc(atlTimeArticle.getContent());
atlTimeArticleFile.setFileUrl(jsonObject.get("url").toString()); atlTimeArticleFile.setFileUrl(jsonObject.get("url").toString());
atlTimeArticleFile.setAudioDuration(atlTimeArticle.getAudioDuration()); atlTimeArticleFile.setAudioDuration(atlTimeArticle.getAudioDuration());
atlTimeArticleFile.setFileDate(atlTimeArticleFileVo.getFileDate());
atlTimeArticleFile.setTitle(atlTimeArticleFileVo.getTitle());
if (atlTimeArticle.getType() == 3) { if (atlTimeArticle.getType() == 3) {
atlTimeArticleFile.setType(1); atlTimeArticleFile.setType(1);
String coverUrl = ""; String coverUrl = "";
...@@ -408,8 +410,8 @@ public class AtlTimeArticleServie { ...@@ -408,8 +410,8 @@ public class AtlTimeArticleServie {
atlTimeArticleDetailsDto.setPrivacySetting(Integer.parseInt(map.get("privacySetting").toString())); atlTimeArticleDetailsDto.setPrivacySetting(Integer.parseInt(map.get("privacySetting").toString()));
atlTimeArticleDetailsDto.setType(Integer.parseInt(map.get("type").toString())); atlTimeArticleDetailsDto.setType(Integer.parseInt(map.get("type").toString()));
atlTimeArticleDetailsDto.setCreateDate(map.get("createDate").toString()); atlTimeArticleDetailsDto.setCreateDate(map.get("createDate").toString());
atlTimeArticleDetailsDto.setTimeName(map.get("timeName")+"");
atlTimeArticleDetailsDto.setTimeName(map.get("authorName")+"");
if (atlTimeArticleDetailsDto.getType() == 1) { if (atlTimeArticleDetailsDto.getType() == 1) {
atlTimeArticleDetailsDto.setAuthor(map.get("author").toString()); atlTimeArticleDetailsDto.setAuthor(map.get("author").toString());
atlTimeArticleDetailsDto.setOccurTime(map.get("occurTime").toString()); atlTimeArticleDetailsDto.setOccurTime(map.get("occurTime").toString());
......
...@@ -10,6 +10,7 @@ import com.hwstudio.antaile.dto.*; ...@@ -10,6 +10,7 @@ import com.hwstudio.antaile.dto.*;
import com.hwstudio.antaile.entity.*; import com.hwstudio.antaile.entity.*;
import com.hwstudio.antaile.exception.BusinessException; import com.hwstudio.antaile.exception.BusinessException;
import com.hwstudio.antaile.mapper.*; import com.hwstudio.antaile.mapper.*;
import com.hwstudio.antaile.queryparam.QueryAtlTimeByBlessIdAndIdxParam;
import com.hwstudio.antaile.queryparam.QueryAtlTimeCountParam; import com.hwstudio.antaile.queryparam.QueryAtlTimeCountParam;
import com.hwstudio.antaile.utils.CommonPage; import com.hwstudio.antaile.utils.CommonPage;
import com.hwstudio.antaile.utils.JsonResult; import com.hwstudio.antaile.utils.JsonResult;
...@@ -829,19 +830,43 @@ public class AtlTimeService { ...@@ -829,19 +830,43 @@ public class AtlTimeService {
* @return * @return
*/ */
public JsonResult selectAtlTimeCountMap(Long userId) { public JsonResult selectAtlTimeCountMap(Long userId) {
if(userId == null){ if (userId == null) {
return JsonResult.failed("传入userId为空"); return JsonResult.failed("传入userId为空");
} }
Map<String,Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
QueryAtlTimeCountParam queryAtlTimeCountParam = new QueryAtlTimeCountParam(); QueryAtlTimeCountParam queryAtlTimeCountParam = new QueryAtlTimeCountParam();
queryAtlTimeCountParam.setUserId(userId); queryAtlTimeCountParam.setUserId(userId);
map.put("创建的纪念馆",this.atlTimeMapper.selectCountAtlTime(queryAtlTimeCountParam)); map.put("创建的纪念馆", this.atlTimeMapper.selectCountAtlTime(queryAtlTimeCountParam));
queryAtlTimeCountParam.setStatus(1); queryAtlTimeCountParam.setStatus(1);
map.put("管理的纪念馆",this.atlTimeMapper.selectCountAtlTime(queryAtlTimeCountParam) ); map.put("管理的纪念馆", this.atlTimeMapper.selectCountAtlTime(queryAtlTimeCountParam));
map.put("关注的纪念馆",this.atlTimeLikeMapper.selectAtlTimeLikeCount(userId) ); map.put("关注的纪念馆", this.atlTimeLikeMapper.selectAtlTimeLikeCount(userId));
map.put("纪念馆访问人数",this.atlTimeMapper.selectAtlTimeReadCountByUserId(userId) ); map.put("纪念馆访问人数", this.atlTimeMapper.selectAtlTimeReadCountByUserId(userId));
return JsonResult.success("查询成功",map); return JsonResult.success("查询成功", map);
} }
/**
* 根据福位id和福位格idxs查询多个时光纪信息
*
* @param queryAtlTimeByBlessIdAndIdxParam
* @return
*/
public JsonResult<List<AtlTimeDTO>> selectAtlTimeInfoByBlessIdAndIdx(QueryAtlTimeByBlessIdAndIdxParam queryAtlTimeByBlessIdAndIdxParam) {
if (queryAtlTimeByBlessIdAndIdxParam.getBlessId() == null) {
return JsonResult.failed("传入福位id为空");
}
if (queryAtlTimeByBlessIdAndIdxParam.getBlessIdxs() == null || queryAtlTimeByBlessIdAndIdxParam.getBlessIdxs().isEmpty()) {
return JsonResult.failed("传入福位格idxs为空");
}
List<AtlTimeDTO> atlTimeDTOList = new ArrayList<>();
Long blessId = queryAtlTimeByBlessIdAndIdxParam.getBlessId();
String[] blessIdxs = queryAtlTimeByBlessIdAndIdxParam.getBlessIdxs().split(",");
for (String idx : blessIdxs) {
AtlTimeDTO atlTimeDTO = this.atlTimeMapper.selectAtlTimeInfoByBlessIdAndIdx(blessId, Integer.valueOf(idx));
if (atlTimeDTO != null) {
atlTimeDTOList.add(atlTimeDTO);
}
}
return JsonResult.success("查询成功", atlTimeDTOList);
}
} }
...@@ -95,12 +95,18 @@ public class AtlWxService { ...@@ -95,12 +95,18 @@ public class AtlWxService {
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public JsonResult getAccessToken(String code, String state, Integer type) { public JsonResult getAccessToken(String code, String state, Integer type) {
AccessTokenParam accessTokenParam = new AccessTokenParam(); String appidParam = "";
accessTokenParam.setAppid(appid); String appSecretParam = "";
accessTokenParam.setSecret(appSecret);
accessTokenParam.setCode(code); if(type.equals(1)){
accessTokenParam.setGrant_type("authorization_code"); appidParam = appid;
String accessTokenRes = HttpUtils.get(getAccessTokenUrl + "?appid=" + appid + "&secret=" + appSecret + "&code=" + code + "&grant_type=authorization_code"); appSecretParam = appSecret;
}else if(type.equals(2)){
appidParam = officeAppid;
appSecretParam = officeAppSecert;
}
String accessTokenRes = HttpUtils.get(getAccessTokenUrl + "?appid=" + appidParam + "&secret=" + appSecretParam + "&code=" + code + "&grant_type=authorization_code");
//{"access_token":"46_YO-dw944jRczqb2SBfIxqRWRYaAClhDV9oLm98RHLYlBrvMzmCmh9Z8ga_6BJm35xjx65oymvZ2LHo8lUkBebD1qZdCA5dV_8igkBTJJ-t4", //{"access_token":"46_YO-dw944jRczqb2SBfIxqRWRYaAClhDV9oLm98RHLYlBrvMzmCmh9Z8ga_6BJm35xjx65oymvZ2LHo8lUkBebD1qZdCA5dV_8igkBTJJ-t4",
// "refresh_token":"46_xIwIY18yjxTNyAfOoWXDdtXTquk63Wwm5w-ASBsCuGh3ov2yrEi5-hDUsBZT6uE_l4c881ux3PeYKyEo1u9hgKuhpSJZTKbYwu3tCS8Dwp0","unionid":"oMKkr6Dkxr4gwkAJBAkd4ctJprWg","openid":"onUQk6gm0ALTXFtddQrikfhmivR0","scope":"snsapi_login","expires_in":7200} // "refresh_token":"46_xIwIY18yjxTNyAfOoWXDdtXTquk63Wwm5w-ASBsCuGh3ov2yrEi5-hDUsBZT6uE_l4c881ux3PeYKyEo1u9hgKuhpSJZTKbYwu3tCS8Dwp0","unionid":"oMKkr6Dkxr4gwkAJBAkd4ctJprWg","openid":"onUQk6gm0ALTXFtddQrikfhmivR0","scope":"snsapi_login","expires_in":7200}
//将返回数据 转成map 获取accessToken数据 //将返回数据 转成map 获取accessToken数据
......
...@@ -170,7 +170,7 @@ public class MsgService { ...@@ -170,7 +170,7 @@ public class MsgService {
map.put("day", str); map.put("day", str);
List<Map<String, Object>> dayList = Lists.newArrayList(); List<Map<String, Object>> dayList = Lists.newArrayList();
for (Map<String, Object> item : list) { for (Map<String, Object> item : list) {
String createTimeStr = item.get("createTime").toString(); String createTimeStr = item.get("createTime")+"";
if (createTimeStr.equals(str)) { if (createTimeStr.equals(str)) {
item.remove("createTime"); item.remove("createTime");
dayList.add(item); dayList.add(item);
......
...@@ -109,7 +109,7 @@ public class SmsService { ...@@ -109,7 +109,7 @@ public class SmsService {
String verifyCode = RandomUtils.nextInt(100000, 1000000) + ""; String verifyCode = RandomUtils.nextInt(100000, 1000000) + "";
JSONObject jsonObject= new JSONObject(); JSONObject jsonObject= new JSONObject();
jsonObject.put("code", verifyCode); jsonObject.put("code", verifyCode);
System.out.println("----------------------------------手机发送的验证码为:"+verifyCode);
Sms sms = new Sms(); Sms sms = new Sms();
sms.setPhonenumber(mobile); sms.setPhonenumber(mobile);
sms.setVerifycode(verifyCode); sms.setVerifycode(verifyCode);
......
...@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel; ...@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -47,4 +48,10 @@ public class AtlTimeArticleFileVo { ...@@ -47,4 +48,10 @@ public class AtlTimeArticleFileVo {
@ApiModelProperty(value="音频时长") @ApiModelProperty(value="音频时长")
private Double audioDuration; private Double audioDuration;
@ApiModelProperty(value = "文件时间")
private Date fileDate;
@ApiModelProperty(value = "标题")
private String title;
} }
...@@ -79,4 +79,8 @@ public class AtlTimeVo { ...@@ -79,4 +79,8 @@ public class AtlTimeVo {
@ApiModelProperty(value="子女个数") @ApiModelProperty(value="子女个数")
private Long childrenNum; private Long childrenNum;
@ApiModelProperty(value = "关联的福位ID(ERP库osh_user_bless_using表bless_id字段)")
private Long blessId;
@ApiModelProperty(value = "关联的福位格ID(ERP库osh_user_bless_using表bless_idx字段)")
private Integer blessIdx;
} }
...@@ -76,7 +76,7 @@ spring: ...@@ -76,7 +76,7 @@ spring:
redirectUri: https://appapi.antaile.net/wx/returnQrcodeAndState redirectUri: https://appapi.antaile.net/wx/returnQrcodeAndState
#此处为微信公众号相关参数 #此处为微信公众号相关参数
officeAppid: wxbd6cf7b619de70d9 officeAppid: wxbd6cf7b619de70d9
officeAppSecert: 79a5044ac7856522eacc9f824013febb officeAppSecert: 4bbb492abc6c12756e4bcbb775ae5069
#微信支付回调地址 #微信支付回调地址
notifyUrl: http://appapi.antaile.net/wx/notify notifyUrl: http://appapi.antaile.net/wx/notify
#商户信息 #商户信息
......
...@@ -28,6 +28,12 @@ ...@@ -28,6 +28,12 @@
<if test="desc != null"> <if test="desc != null">
descr, descr,
</if> </if>
<if test="fileDate != null">
file_date,
</if>
<if test="title != null and title != ''">
title,
</if>
create_date, update_date create_date, update_date
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides="," > <trim prefix="values (" suffix=")" suffixOverrides="," >
...@@ -55,12 +61,19 @@ ...@@ -55,12 +61,19 @@
<if test="desc != null"> <if test="desc != null">
#{desc}, #{desc},
</if> </if>
<if test="fileDate != null">
#{fileDate},
</if>
<if test="title != null and title != ''">
#{title},
</if>
NOW(), NOW() NOW(), NOW()
</trim> </trim>
</insert> </insert>
<select id="getFileList" resultType="java.util.Map"> <select id="getFileList" resultType="java.util.Map">
SELECT id, file_url AS url, cover_url AS coverUrl, audio_duration AS audioDuration FROM atl_time_article_file WHERE time_article_id = #{id} and del_flag = '0' SELECT id, file_url AS url, cover_url AS coverUrl, audio_duration AS audioDuration ,file_date fileDate,title
FROM atl_time_article_file WHERE time_article_id = #{id} and del_flag = '0'
</select> </select>
<select id="findFileListDel" resultType="java.util.Map"> <select id="findFileListDel" resultType="java.util.Map">
......
...@@ -114,10 +114,14 @@ ...@@ -114,10 +114,14 @@
</select> </select>
<select id="getDetails" resultType="java.util.Map"> <select id="getDetails" resultType="java.util.Map">
SELECT id, title, type, content, author, privacy_setting AS privacySetting, date_format(occur_time, '%Y-%m-%d') AS occurTime, SELECT a.id, a.title, a.type, a.content, a.author, a.privacy_setting AS privacySetting, date_format(a.occur_time, '%Y-%m-%d') AS occurTime,
label, date_format(create_date, '%Y-%m-%d %H:%i:%s') AS createDate, collection a.label, date_format(a.create_date, '%Y-%m-%d %H:%i:%s') AS createDate, a.collection,
FROM atl_time_article b.name timeName,
WHERE id = #{id} c.nick_name authorName
FROM atl_time_article a
left join atl_time b ON a.time_id = b.id
left join atl_user c ON b.user_id = c.id
WHERE a.id = #{id}
</select> </select>
<select id="getArticelTypeList" resultType="java.util.Map"> <select id="getArticelTypeList" resultType="java.util.Map">
......
...@@ -55,8 +55,22 @@ ...@@ -55,8 +55,22 @@
<insert id="insert" keyProperty="id" keyColumn="id" useGeneratedKeys="true"> <insert id="insert" keyProperty="id" keyColumn="id" useGeneratedKeys="true">
INSERT INTO atl_time(user_id, template_id, name, about_name, privacy_setting, cover_url, is_default, read_count, like_count, create_date, update_date) INSERT INTO atl_time(user_id, template_id, name, about_name, privacy_setting, cover_url, is_default, read_count, like_count, create_date, update_date
VALUES(#{userId}, #{templateId}, #{name}, #{aboutName}, #{privacySetting}, #{coverUrl}, #{isDefault}, #{readCount}, #{likeCount}, NOW(), NOW()) <if test="blessId != null">
,bless_id
</if>
<if test="blessIdx != null">
,bless_idx
</if>
)
VALUES(#{userId}, #{templateId}, #{name}, #{aboutName}, #{privacySetting}, #{coverUrl}, #{isDefault}, #{readCount}, #{likeCount}, NOW(), NOW()
<if test="blessId != null">
,#{blessId}
</if>
<if test="blessIdx != null">
,#{blessIdx}
</if>
)
</insert> </insert>
<select id="getTime" resultType="com.hwstudio.antaile.entity.AtlTime"> <select id="getTime" resultType="com.hwstudio.antaile.entity.AtlTime">
...@@ -304,4 +318,15 @@ ...@@ -304,4 +318,15 @@
where user_id =#{userId} where user_id =#{userId}
and status = 1 and status = 1
</select> </select>
<select id="selectAtlTimeInfoByBlessIdAndIdx" resultType="com.hwstudio.antaile.dto.AtlTimeDTO">
select
a.id,a.name,a.about_name aboutName,a.bless_id blessId,a.bless_idx blessIdx,
b.image_url imageUrl
from atl_time a
left join atl_time_owner b ON a.id = b.time_id
where a.bless_id = #{blessId}
and a.bless_idx=#{blessIdx}
and a.status = 1
</select>
</mapper> </mapper>
\ No newline at end of file
<?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.hwstudio.antaile.mbg.mapper.AtlAppstoreCatsMapper">
<resultMap id="BaseResultMap" type="com.hwstudio.antaile.mbg.po.AtlAppstoreCats">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="module" jdbcType="TINYINT" property="module" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="is_shop" jdbcType="TINYINT" property="isShop" />
<result column="is_delete" jdbcType="TINYINT" property="isDelete" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</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, module, name, is_shop, is_delete, remark, create_time, update_time
</sql>
<select id="selectByExample" parameterType="com.hwstudio.antaile.mbg.po.AtlAppstoreCatsExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from atl_appstore_cats
<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 atl_appstore_cats
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from atl_appstore_cats
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.hwstudio.antaile.mbg.po.AtlAppstoreCatsExample">
delete from atl_appstore_cats
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.hwstudio.antaile.mbg.po.AtlAppstoreCats">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into atl_appstore_cats (module, name, is_shop,
is_delete, remark, create_time,
update_time)
values (#{module,jdbcType=TINYINT}, #{name,jdbcType=VARCHAR}, #{isShop,jdbcType=TINYINT},
#{isDelete,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.hwstudio.antaile.mbg.po.AtlAppstoreCats">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into atl_appstore_cats
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="module != null">
module,
</if>
<if test="name != null">
name,
</if>
<if test="isShop != null">
is_shop,
</if>
<if test="isDelete != null">
is_delete,
</if>
<if test="remark != null">
remark,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="module != null">
#{module,jdbcType=TINYINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="isShop != null">
#{isShop,jdbcType=TINYINT},
</if>
<if test="isDelete != null">
#{isDelete,jdbcType=TINYINT},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.hwstudio.antaile.mbg.po.AtlAppstoreCatsExample" resultType="java.lang.Long">
select count(*) from atl_appstore_cats
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update atl_appstore_cats
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.module != null">
module = #{record.module,jdbcType=TINYINT},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.isShop != null">
is_shop = #{record.isShop,jdbcType=TINYINT},
</if>
<if test="record.isDelete != null">
is_delete = #{record.isDelete,jdbcType=TINYINT},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update atl_appstore_cats
set id = #{record.id,jdbcType=BIGINT},
module = #{record.module,jdbcType=TINYINT},
name = #{record.name,jdbcType=VARCHAR},
is_shop = #{record.isShop,jdbcType=TINYINT},
is_delete = #{record.isDelete,jdbcType=TINYINT},
remark = #{record.remark,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.hwstudio.antaile.mbg.po.AtlAppstoreCats">
update atl_appstore_cats
<set>
<if test="module != null">
module = #{module,jdbcType=TINYINT},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="isShop != null">
is_shop = #{isShop,jdbcType=TINYINT},
</if>
<if test="isDelete != null">
is_delete = #{isDelete,jdbcType=TINYINT},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.hwstudio.antaile.mbg.po.AtlAppstoreCats">
update atl_appstore_cats
set module = #{module,jdbcType=TINYINT},
name = #{name,jdbcType=VARCHAR},
is_shop = #{isShop,jdbcType=TINYINT},
is_delete = #{isDelete,jdbcType=TINYINT},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
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