Commit 62c502ac by tyfanchz

产品列表功能开发

1 parent 586fc239
Showing 25 changed files with 159 additions and 106 deletions
......@@ -2,11 +2,13 @@ package com.glsx.smart.controller;
import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageInfo;
import com.glsx.plat.common.utils.StringUtils;
import com.glsx.smart.dao.entity.SmartProduct;
import com.glsx.smart.exception.BusinessException;
import com.glsx.smart.exception.ResultEnum;
import com.glsx.smart.pojo.SmartProductReq;
import com.glsx.smart.service.SmartProductService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -20,17 +22,16 @@ import org.springframework.web.bind.annotation.RestController;
* @author wbh
* @date 2021-03-15
*/
@Slf4j
@RestController
@RequestMapping("/product")
public class ProductController {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private SmartProductService productService;
@RequestMapping(value = "/getList", method = {RequestMethod.GET, RequestMethod.POST})
public PageInfo<SmartProduct> getList(SmartProductReq req) {
logger.info("/product/getList param: {}", JSON.toJSONString(req));
log.info("/product/getList param: {}", JSON.toJSONString(req));
return productService.getList(req);
}
......@@ -41,6 +42,31 @@ public class ProductController {
@RequestMapping(value = "/save", method = {RequestMethod.POST})
public void save(@RequestBody SmartProduct product) {
log.info("$$$$ /product/save param: {}", JSON.toJSONString(product));
productService.save(product);
}
@RequestMapping(value = "/getCommandSetById", method = {RequestMethod.GET, RequestMethod.POST})
public void getCommandSetById(Long id) {
if (id == null) {
throw new BusinessException(ResultEnum.PARAM_ERROR);
}
productService.getCommandSetById(id);
}
@RequestMapping(value = "/checkShopProductId", method = {RequestMethod.GET, RequestMethod.POST})
public void checkShopProductId(String shopProductId) {
if (StringUtils.isBlank(shopProductId)) {
throw new BusinessException(ResultEnum.PARAM_ERROR);
}
productService.checkShopProductId(shopProductId);
}
@RequestMapping(value = "/putOnOff", method = {RequestMethod.GET, RequestMethod.POST})
public void putOnOff(Long id) {
if (id == null) {
throw new BusinessException(ResultEnum.PARAM_ERROR);
}
productService.putOnOff(id);
}
}
......@@ -3,8 +3,7 @@ package com.glsx.smart.controller;
import java.util.List;
import com.glsx.smart.dao.entity.SmartProductType;
import com.glsx.smart.service.SmartProductTypeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -18,11 +17,10 @@ import org.springframework.web.bind.annotation.RestController;
* @author wbh
* @date 2021-03-15
*/
@Slf4j
@RestController
@RequestMapping("/productType")
public class ProductTypeController {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private SmartProductTypeService productTypeService;
......
......@@ -3,8 +3,7 @@ package com.glsx.smart.controller;
import java.util.List;
import com.glsx.smart.dao.entity.SmartScene;
import com.glsx.smart.service.SmartSceneService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -18,11 +17,10 @@ import org.springframework.web.bind.annotation.RestController;
* @author wbh
* @date 2021-03-15
*/
@Slf4j
@RestController
@RequestMapping("/scene")
public class SceneController {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private SmartSceneService sceneService;
......
......@@ -3,8 +3,7 @@ package com.glsx.smart.controller;
import java.util.List;
import com.glsx.smart.dao.entity.SmartSceneTemplate;
import com.glsx.smart.service.SmartSceneTemplateService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -18,10 +17,10 @@ import org.springframework.web.bind.annotation.RestController;
* @author wbh
* @date 2021-03-15
*/
@Slf4j
@RestController
@RequestMapping("/sceneTemplate")
public class SceneTemplateController {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private SmartSceneTemplateService sceneTemplateService;
......
......@@ -5,8 +5,7 @@ import com.github.pagehelper.PageInfo;
import com.glsx.smart.dao.entity.SmartSysCode;
import com.glsx.smart.pojo.SmartSysCodeReq;
import com.glsx.smart.service.SmartSysCodeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
......@@ -19,17 +18,16 @@ import org.springframework.web.bind.annotation.RestController;
* @author wbh
* @date 2021-03-15
*/
@Slf4j
@RestController
@RequestMapping("/sysCode")
public class SysCodeController {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private SmartSysCodeService sysCodeService;
@RequestMapping(value = "/getList", method = {RequestMethod.GET, RequestMethod.POST})
public PageInfo<SmartSysCode> getList(SmartSysCodeReq req) {
this.logger.info("$$$$ /sysCode/getList param: {}", JSON.toJSONString(req));
log.info("$$$$ /sysCode/getList param: {}", JSON.toJSONString(req));
return sysCodeService.getList(req);
}
}
......@@ -2,8 +2,7 @@ package com.glsx.smart.controller;
import com.glsx.smart.dao.entity.SmartSysFile;
import com.glsx.smart.service.SmartSysFileService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
......@@ -18,11 +17,10 @@ import org.springframework.web.multipart.MultipartFile;
* @author wbh
* @date 2021-03-15
*/
@Slf4j
@RestController
@RequestMapping("/sysFile")
public class SysFileController {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private SmartSysFileService sysFileService;
......
......@@ -29,7 +29,7 @@ public class SmartSceneData {
/**
* 场景ID 关联smart_scene中id
*/
private Long templateId;
private Long sceneId;
/**
* 类型 1触发条件 2执行内容
......@@ -59,12 +59,12 @@ public class SmartSceneData {
this.id = id;
}
public Long getTemplateId() {
return templateId;
public Long getSceneId() {
return sceneId;
}
public void setTemplateId(Long templateId) {
this.templateId = templateId;
public void setSceneId(Long sceneId) {
this.sceneId = sceneId;
}
public Byte getType() {
......@@ -101,17 +101,13 @@ public class SmartSceneData {
@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(", templateId=").append(templateId);
sb.append(", type=").append(type);
sb.append(", sort=").append(sort);
sb.append(", paramKey=").append(paramKey);
sb.append(", paramValue=").append(paramValue);
sb.append("]");
return sb.toString();
return "SmartSceneData{" +
"id=" + id +
", sceneId=" + sceneId +
", type=" + type +
", sort=" + sort +
", paramKey='" + paramKey + '\'' +
", paramValue='" + paramValue + '\'' +
'}';
}
}
......@@ -18,6 +18,7 @@ import org.apache.ibatis.annotations.Param;
public interface SmartSysCodeMapper extends tk.mybatis.mapper.common.Mapper<SmartSysCode> {
List<SmartSysCode> getList(SmartSysCodeReq req);
int insertOrUpdate(SmartSysCode record);
int insertOrUpdateSelective(SmartSysCode record);
......
......@@ -13,11 +13,16 @@ import org.springframework.web.bind.annotation.RestControllerAdvice;
* @date 2021-03-16
*/
@RestControllerAdvice
public class BusinessExceptionHandler {
public class GlobalExceptionHandler {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@ExceptionHandler(BusinessException.class)
public void handleBusinessException(BusinessException e) {
logger.error("!!!! ERROR", e);
logger.error("!!!! 业务异常", e);
}
@ExceptionHandler(Exception.class)
public void handleException(Exception e) {
logger.error("!!!! 未知异常", e);
}
}
......@@ -28,6 +28,21 @@ public class SmartSysCodeReq extends BaseDTO {
*/
private String parentKey;
/**
* 排序
*/
private Byte sort;
/**
* 状态:0下线 1上线
*/
private Byte status;
/**
* 分级
*/
private Byte level;
public String getDictType() {
return dictType;
}
......@@ -60,6 +75,30 @@ public class SmartSysCodeReq extends BaseDTO {
this.parentKey = parentKey;
}
public Byte getSort() {
return sort;
}
public void setSort(Byte sort) {
this.sort = sort;
}
public Byte getStatus() {
return status;
}
public void setStatus(Byte status) {
this.status = status;
}
public Byte getLevel() {
return level;
}
public void setLevel(Byte level) {
this.level = level;
}
@Override
public String toString() {
return "SmartSysCodeReq{" +
......@@ -67,6 +106,9 @@ public class SmartSysCodeReq extends BaseDTO {
", dictKey='" + dictKey + '\'' +
", dictValue='" + dictValue + '\'' +
", parentKey='" + parentKey + '\'' +
", sort=" + sort +
", status=" + status +
", level=" + level +
"} " + super.toString();
}
}
......@@ -2,8 +2,6 @@ package com.glsx.smart.service;
import com.github.pagehelper.PageHelper;
import com.glsx.smart.pojo.BaseDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* <p>Description: 公共 Service 业务
......@@ -13,8 +11,6 @@ import org.slf4j.LoggerFactory;
* @date 2021-03-15
*/
public abstract class BaseService {
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
/**
* 按需开启分页,调用此方法后需紧跟查询 sql,否则分页将不生效
*
......
package com.glsx.smart.service;
import org.springframework.stereotype.Service;
/**
* @author deployer name
* @version V1.0
* @Title: DemoService.java
* @Description:
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2017
*/
@Service
public class DemoService {
}
......@@ -5,6 +5,7 @@ import java.util.List;
import com.glsx.smart.dao.entity.SmartDevideStatus;
import com.glsx.smart.dao.mapper.SmartDevideStatusMapper;
import com.glsx.smart.service.SmartDevideStatusService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
......@@ -14,10 +15,9 @@ import org.springframework.stereotype.Service;
* @author wbh
* @date 2021-03-15
*/
@Slf4j
@Service
public class SmartDevideStatusServiceImpl implements SmartDevideStatusService {
@Resource
private SmartDevideStatusMapper smartDevideStatusMapper;
......
......@@ -10,6 +10,7 @@ import com.glsx.smart.exception.ResultEnum;
import com.glsx.smart.pojo.SmartProductReq;
import com.glsx.smart.service.BaseService;
import com.glsx.smart.service.SmartProductService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -20,7 +21,7 @@ import org.springframework.transaction.annotation.Transactional;
* @author wbh
* @date 2021-03-15
*/
@Slf4j
@Service
public class SmartProductServiceImpl extends BaseService implements SmartProductService {
@Resource
......@@ -61,10 +62,8 @@ public class SmartProductServiceImpl extends BaseService implements SmartProduct
@Transactional
public void save(SmartProduct product) {
if (product.getId() == null) {
super.logger.info("$$$$ Starting inserting...");
productMapper.insertSelective(product);
} else {
super.logger.info("$$$$ Starting updating...");
SmartProduct record = productMapper.selectByPrimaryKey(product.getId());
if (record != null) {
productMapper.updateByPrimaryKeySelective(product);
......@@ -86,6 +85,11 @@ public class SmartProductServiceImpl extends BaseService implements SmartProduct
@Override
public void putOnOff(Long id) {
SmartProduct product = productMapper.selectByPrimaryKey(id);
if (product == null) {
throw new BusinessException(ResultEnum.PRODUCT_NOT_FOUND);
}
product.setStatus((byte) (product.getStatus() ^ 0b00000001));
productMapper.updateByPrimaryKeySelective(product);
}
}
......@@ -5,6 +5,7 @@ import java.util.List;
import com.glsx.smart.dao.entity.SmartProductTypeParam;
import com.glsx.smart.dao.mapper.SmartProductTypeParamMapper;
import com.glsx.smart.service.SmartProductTypeParamService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
......@@ -14,10 +15,9 @@ import org.springframework.stereotype.Service;
* @author wbh
* @date 2021-03-15
*/
@Slf4j
@Service
public class SmartProductTypeParamServiceImpl implements SmartProductTypeParamService {
@Resource
private SmartProductTypeParamMapper smartProductTypeParamMapper;
......
......@@ -8,6 +8,7 @@ import com.glsx.smart.dao.mapper.SmartProductTypeMapper;
import com.glsx.smart.exception.BusinessException;
import com.glsx.smart.exception.ResultEnum;
import com.glsx.smart.service.SmartProductTypeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
......@@ -17,7 +18,7 @@ import org.springframework.stereotype.Service;
* @author wbh
* @date 2021-03-15
*/
@Slf4j
@Service
public class SmartProductTypeServiceImpl implements SmartProductTypeService {
@Resource
......
......@@ -7,6 +7,7 @@ import com.glsx.smart.dao.mapper.SmartSceneDataMapper;
import com.glsx.smart.exception.BusinessException;
import com.glsx.smart.exception.ResultEnum;
import com.glsx.smart.service.SmartSceneDataService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
......@@ -16,10 +17,9 @@ import org.springframework.stereotype.Service;
* @author wbh
* @date 2021-03-15
*/
@Slf4j
@Service
public class SmartSceneDataServiceImpl implements SmartSceneDataService {
@Resource
private SmartSceneDataMapper smartSceneDataMapper;
......
......@@ -7,6 +7,7 @@ import com.glsx.smart.dao.mapper.SmartSceneMapper;
import com.glsx.smart.exception.BusinessException;
import com.glsx.smart.exception.ResultEnum;
import com.glsx.smart.service.SmartSceneService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
......@@ -16,10 +17,9 @@ import org.springframework.stereotype.Service;
* @author wbh
* @date 2021-03-15
*/
@Slf4j
@Service
public class SmartSceneServiceImpl implements SmartSceneService {
@Resource
private SmartSceneMapper smartSceneMapper;
......
......@@ -7,6 +7,7 @@ import com.glsx.smart.dao.mapper.SmartSceneTemplateMapper;
import com.glsx.smart.exception.BusinessException;
import com.glsx.smart.exception.ResultEnum;
import com.glsx.smart.service.SmartSceneTemplateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
......@@ -16,10 +17,9 @@ import org.springframework.stereotype.Service;
* @author wbh
* @date 2021-03-15
*/
@Slf4j
@Service
public class SmartSceneTemplateServiceImpl implements SmartSceneTemplateService {
@Resource
private SmartSceneTemplateMapper smartSceneTemplateMapper;
......
......@@ -10,6 +10,7 @@ import com.glsx.smart.exception.ResultEnum;
import com.glsx.smart.pojo.SmartSysCodeReq;
import com.glsx.smart.service.BaseService;
import com.glsx.smart.service.SmartSysCodeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
......@@ -19,10 +20,9 @@ import org.springframework.stereotype.Service;
* @author wbh
* @date 2021-03-15
*/
@Slf4j
@Service
public class SmartSysCodeServiceImpl extends BaseService implements SmartSysCodeService {
@Resource
private SmartSysCodeMapper sysCodeMapper;
......
......@@ -7,6 +7,7 @@ import com.glsx.smart.dao.mapper.SmartSysFileMapper;
import com.glsx.smart.exception.BusinessException;
import com.glsx.smart.exception.ResultEnum;
import com.glsx.smart.service.SmartSysFileService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
......@@ -16,10 +17,9 @@ import org.springframework.stereotype.Service;
* @author wbh
* @date 2021-03-15
*/
@Slf4j
@Service
public class SmartSysFileServiceImpl implements SmartSysFileService {
@Resource
private SmartSysFileMapper smartSysFileMapper;
......
......@@ -7,6 +7,7 @@ import com.glsx.smart.dao.mapper.SmartTemplateParamMapper;
import com.glsx.smart.exception.BusinessException;
import com.glsx.smart.exception.ResultEnum;
import com.glsx.smart.service.SmartTemplateParamService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
......@@ -16,10 +17,9 @@ import org.springframework.stereotype.Service;
* @author wbh
* @date 2021-03-15
*/
@Slf4j
@Service
public class SmartTemplateParamServiceImpl implements SmartTemplateParamService {
@Resource
private SmartTemplateParamMapper smartTemplateParamMapper;
......
......@@ -7,6 +7,7 @@ import com.glsx.smart.dao.mapper.SmartUserRelationMapper;
import com.glsx.smart.exception.BusinessException;
import com.glsx.smart.exception.ResultEnum;
import com.glsx.smart.service.SmartUserRelationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
......@@ -16,10 +17,9 @@ import org.springframework.stereotype.Service;
* @author wbh
* @date 2021-03-15
*/
@Slf4j
@Service
public class SmartUserRelationServiceImpl implements SmartUserRelationService {
@Resource
private SmartUserRelationMapper smartUserRelationMapper;
......
......@@ -6,7 +6,7 @@
<!--@mbg.generated-->
<!--@Table smart_scene_data-->
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="template_id" jdbcType="BIGINT" property="templateId"/>
<result column="scene_id" jdbcType="BIGINT" property="sceneId"/>
<result column="type" jdbcType="TINYINT" property="type"/>
<result column="sort" jdbcType="TINYINT" property="sort"/>
<result column="param_key" jdbcType="VARCHAR" property="paramKey"/>
......@@ -14,15 +14,15 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, template_id, `type`, sort, param_key, param_value
id, scene_id, `type`, sort, param_key, param_value
</sql>
<update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated-->
update smart_scene_data
<trim prefix="set" suffixOverrides=",">
<trim prefix="template_id = case" suffix="end,">
<trim prefix="scene_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.templateId,jdbcType=BIGINT}
when id = #{item.id,jdbcType=BIGINT} then #{item.sceneId,jdbcType=BIGINT}
</foreach>
</trim>
<trim prefix="`type` = case" suffix="end,">
......@@ -55,10 +55,10 @@
<!--@mbg.generated-->
update smart_scene_data
<trim prefix="set" suffixOverrides=",">
<trim prefix="template_id = case" suffix="end,">
<trim prefix="scene_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.templateId != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.templateId,jdbcType=BIGINT}
<if test="item.sceneId != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.sceneId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
......@@ -101,10 +101,10 @@
useGeneratedKeys="true">
<!--@mbg.generated-->
insert into smart_scene_data
(template_id, `type`, sort, param_key, param_value)
(scene_id, `type`, sort, param_key, param_value)
values
<foreach collection="list" item="item" separator=",">
(#{item.templateId,jdbcType=BIGINT}, #{item.type,jdbcType=TINYINT},
(#{item.sceneId,jdbcType=BIGINT}, #{item.type,jdbcType=TINYINT},
#{item.sort,jdbcType=TINYINT},
#{item.paramKey,jdbcType=VARCHAR}, #{item.paramValue,jdbcType=VARCHAR})
</foreach>
......@@ -117,7 +117,7 @@
<if test="id != null">
id,
</if>
template_id,
scene_id,
`type`,
sort,
param_key,
......@@ -128,7 +128,7 @@
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
#{templateId,jdbcType=BIGINT},
#{sceneId,jdbcType=BIGINT},
#{type,jdbcType=TINYINT},
#{sort,jdbcType=TINYINT},
#{paramKey,jdbcType=VARCHAR},
......@@ -139,7 +139,7 @@
<if test="id != null">
id = #{id,jdbcType=BIGINT},
</if>
template_id = #{templateId,jdbcType=BIGINT},
scene_id = #{sceneId,jdbcType=BIGINT},
`type` = #{type,jdbcType=TINYINT},
sort = #{sort,jdbcType=TINYINT},
param_key = #{paramKey,jdbcType=VARCHAR},
......@@ -154,8 +154,8 @@
<if test="id != null">
id,
</if>
<if test="templateId != null">
template_id,
<if test="sceneId != null">
scene_id,
</if>
<if test="type != null">
`type`,
......@@ -175,8 +175,8 @@
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="templateId != null">
#{templateId,jdbcType=BIGINT},
<if test="sceneId != null">
#{sceneId,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=TINYINT},
......@@ -196,8 +196,8 @@
<if test="id != null">
id = #{id,jdbcType=BIGINT},
</if>
<if test="templateId != null">
template_id = #{templateId,jdbcType=BIGINT},
<if test="sceneId != null">
scene_id = #{sceneId,jdbcType=BIGINT},
</if>
<if test="type != null">
`type` = #{type,jdbcType=TINYINT},
......
......@@ -32,6 +32,13 @@
<if test="dictType != null and dictType != ''">
and ssc.dict_type = #{dictType,jdbcType=VARCHAR}
</if>
<if test="parentKey != null and parentKey != ''">
and ssc.parent_key = #{parentKey,jdbcType=VARCHAR}
</if>
<if test="level != null">
and ssc.level = #{level,jdbcType=TINYINT}
</if>
and ssc.status = 1
</where>
order by ssc.create_time desc, ssc.sort asc
</select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!