修改代码
This commit is contained in:
@ -5,6 +5,8 @@ public enum CustomerQandaConstant {
|
|||||||
REPLY(1L), // 回复状态
|
REPLY(1L), // 回复状态
|
||||||
WAIT_REPLY(0L); // 待回复状态
|
WAIT_REPLY(0L); // 待回复状态
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private final Long status;
|
private final Long status;
|
||||||
|
|
||||||
CustomerQandaConstant(Long status) {
|
CustomerQandaConstant(Long status) {
|
||||||
|
@ -25,4 +25,12 @@ public interface UpConstant {
|
|||||||
* 禁用
|
* 禁用
|
||||||
*/
|
*/
|
||||||
public static final Long DISABLE = 1L;
|
public static final Long DISABLE = 1L;
|
||||||
|
/**
|
||||||
|
* 发布
|
||||||
|
*/
|
||||||
|
public static final Long RELEASE = 1L;
|
||||||
|
/**
|
||||||
|
* 未发布
|
||||||
|
*/
|
||||||
|
public static final Long UNRELEASE = 0L;
|
||||||
}
|
}
|
||||||
|
@ -27,16 +27,19 @@
|
|||||||
<result property="updateTime" column="update_time"/>
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="lastUpdateTime" column="last_update_time"/>
|
<result property="lastUpdateTime" column="last_update_time"/>
|
||||||
<result property="addressImg" column="address_img"/>
|
<result property="addressImg" column="address_img"/>
|
||||||
|
<result property="status" column="status"/>
|
||||||
|
<result property="isTop" column="is_top"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectCoscoPortalsCustomerQandaVo">
|
<sql id="selectCoscoPortalsCustomerQandaVo">
|
||||||
select id,
|
select id,
|
||||||
title,
|
title,
|
||||||
|
is_top,
|
||||||
address_img,
|
address_img,
|
||||||
content,
|
content,
|
||||||
ask_time,
|
ask_time,
|
||||||
type,
|
type,
|
||||||
|
status,
|
||||||
full_name,
|
full_name,
|
||||||
company_name,
|
company_name,
|
||||||
user_name,
|
user_name,
|
||||||
@ -189,6 +192,8 @@
|
|||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
<if test="lastUpdateTime != null">last_update_time,</if>
|
<if test="lastUpdateTime != null">last_update_time,</if>
|
||||||
<if test="addressImg != null">address_img,</if>
|
<if test="addressImg != null">address_img,</if>
|
||||||
|
<if test="status != null">status,</if>
|
||||||
|
<if test="isTop != null">is_top,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">#{id},</if>
|
<if test="id != null">#{id},</if>
|
||||||
@ -212,7 +217,8 @@
|
|||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
<if test="lastUpdateTime != null">#{lastUpdateTime},</if>
|
<if test="lastUpdateTime != null">#{lastUpdateTime},</if>
|
||||||
<if test="addressImg != null">#{addressImg},</if>
|
<if test="addressImg != null">#{addressImg},</if>
|
||||||
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="isTop != null">#{isTop},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="batchCoscoPortalsCustomerQanda" parameterType="java.util.List">
|
<insert id="batchCoscoPortalsCustomerQanda" parameterType="java.util.List">
|
||||||
@ -292,6 +298,12 @@
|
|||||||
<if test="addressImg != null">address_img =
|
<if test="addressImg != null">address_img =
|
||||||
#{addressImg},
|
#{addressImg},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="status != null">status =
|
||||||
|
#{status},
|
||||||
|
</if>
|
||||||
|
<if test="isTop != null">is_top =
|
||||||
|
#{isTop},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
@ -71,6 +71,10 @@ public class CoscoPortalsCustomerQanda extends BaseEntity {
|
|||||||
|
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
|
private Long status;
|
||||||
|
|
||||||
|
private Long isTop;
|
||||||
|
|
||||||
@ApiModelProperty(value = "分页对象信息")
|
@ApiModelProperty(value = "分页对象信息")
|
||||||
private BasePageRequest basePageRequest;
|
private BasePageRequest basePageRequest;
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.chinaunicom.zyhy.ebtp.supplier.portals.service;
|
package com.chinaunicom.zyhy.ebtp.supplier.portals.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsCustomerQanda;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsHelpcenterQanda;
|
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsHelpcenterQanda;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -80,4 +81,10 @@ public interface ICoscoPortalsHelpcenterQandaService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int down(String id);
|
int down(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布添加帮助中心_问答
|
||||||
|
* @param coscoPortalsCustomerQanda
|
||||||
|
*/
|
||||||
|
void addHelpcenterQanda(CoscoPortalsCustomerQanda coscoPortalsCustomerQanda);
|
||||||
}
|
}
|
||||||
|
@ -7,11 +7,11 @@ import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
|
|||||||
import com.chinaunicom.mall.ebtp.common.base.util.TokenUtil;
|
import com.chinaunicom.mall.ebtp.common.base.util.TokenUtil;
|
||||||
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.CustomerQandaConstant;
|
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.CustomerQandaConstant;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.UserConstant;
|
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.UpConstant;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.dao.CoscoPortalsCustomerQandaMapper;
|
import com.chinaunicom.zyhy.ebtp.supplier.portals.dao.CoscoPortalsCustomerQandaMapper;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsCustomerQanda;
|
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsCustomerQanda;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsHelpcenterQanda;
|
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.service.ICoscoPortalsCustomerQandaService;
|
import com.chinaunicom.zyhy.ebtp.supplier.portals.service.ICoscoPortalsCustomerQandaService;
|
||||||
|
import com.chinaunicom.zyhy.ebtp.supplier.portals.service.ICoscoPortalsHelpcenterQandaService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@ -28,6 +28,8 @@ import java.util.List;
|
|||||||
public class CoscoPortalsCustomerQandaServiceImpl extends BaseServiceImpl<CoscoPortalsCustomerQandaMapper, CoscoPortalsCustomerQanda> implements ICoscoPortalsCustomerQandaService {
|
public class CoscoPortalsCustomerQandaServiceImpl extends BaseServiceImpl<CoscoPortalsCustomerQandaMapper, CoscoPortalsCustomerQanda> implements ICoscoPortalsCustomerQandaService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private CoscoPortalsCustomerQandaMapper coscoPortalsCustomerQandaMapper;
|
private CoscoPortalsCustomerQandaMapper coscoPortalsCustomerQandaMapper;
|
||||||
|
@Autowired
|
||||||
|
private ICoscoPortalsHelpcenterQandaService coscoPortalsHelpcenterQandaService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询中远门户_用户提问_问答
|
* 查询中远门户_用户提问_问答
|
||||||
@ -66,7 +68,11 @@ public class CoscoPortalsCustomerQandaServiceImpl extends BaseServiceImpl<CoscoP
|
|||||||
coscoPortalsCustomerQanda.setAskTime(date);
|
coscoPortalsCustomerQanda.setAskTime(date);
|
||||||
BaseCacheUser currentUser = TokenUtil.getCurrentUser();
|
BaseCacheUser currentUser = TokenUtil.getCurrentUser();
|
||||||
coscoPortalsCustomerQanda.setCreateBy(currentUser.getUserId());
|
coscoPortalsCustomerQanda.setCreateBy(currentUser.getUserId());
|
||||||
return coscoPortalsCustomerQandaMapper.insertCoscoPortalsCustomerQanda(coscoPortalsCustomerQanda);
|
coscoPortalsCustomerQandaMapper.insertCoscoPortalsCustomerQanda(coscoPortalsCustomerQanda);
|
||||||
|
if(UpConstant.RELEASE.equals(coscoPortalsCustomerQanda.getStatus())){
|
||||||
|
coscoPortalsHelpcenterQandaService.addHelpcenterQanda(coscoPortalsCustomerQanda);
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,7 +92,11 @@ public class CoscoPortalsCustomerQandaServiceImpl extends BaseServiceImpl<CoscoP
|
|||||||
coscoPortalsCustomerQanda.setAnswerBy(currentUser.getUserId());
|
coscoPortalsCustomerQanda.setAnswerBy(currentUser.getUserId());
|
||||||
coscoPortalsCustomerQanda.setAnswerTime(date);
|
coscoPortalsCustomerQanda.setAnswerTime(date);
|
||||||
}
|
}
|
||||||
return coscoPortalsCustomerQandaMapper.updateCoscoPortalsCustomerQanda(coscoPortalsCustomerQanda);
|
coscoPortalsCustomerQandaMapper.updateCoscoPortalsCustomerQanda(coscoPortalsCustomerQanda);
|
||||||
|
if(UpConstant.RELEASE.equals(coscoPortalsCustomerQanda.getStatus())){
|
||||||
|
coscoPortalsHelpcenterQandaService.addHelpcenterQanda(coscoPortalsCustomerQanda);
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -9,6 +9,7 @@ import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
|||||||
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.UpConstant;
|
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.UpConstant;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.UserConstant;
|
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.UserConstant;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.dao.CoscoPortalsHelpcenterQandaMapper;
|
import com.chinaunicom.zyhy.ebtp.supplier.portals.dao.CoscoPortalsHelpcenterQandaMapper;
|
||||||
|
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsCustomerQanda;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsHelpcenterQanda;
|
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsHelpcenterQanda;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.service.ICoscoPortalsHelpcenterQandaService;
|
import com.chinaunicom.zyhy.ebtp.supplier.portals.service.ICoscoPortalsHelpcenterQandaService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -68,6 +69,17 @@ public class CoscoPortalsHelpcenterQandaServiceImpl extends BaseServiceImpl<Cosc
|
|||||||
return coscoPortalsHelpcenterQandaMapper.insertCoscoPortalsHelpcenterQanda(coscoPortalsHelpcenterQanda);
|
return coscoPortalsHelpcenterQandaMapper.insertCoscoPortalsHelpcenterQanda(coscoPortalsHelpcenterQanda);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addHelpcenterQanda(CoscoPortalsCustomerQanda coscoPortalsCustomerQanda) {
|
||||||
|
CoscoPortalsHelpcenterQanda coscoPortalsHelpcenterQanda = new CoscoPortalsHelpcenterQanda();
|
||||||
|
coscoPortalsHelpcenterQanda.setTitle(coscoPortalsCustomerQanda.getTitle());
|
||||||
|
coscoPortalsHelpcenterQanda.setContent(coscoPortalsCustomerQanda.getContent());
|
||||||
|
coscoPortalsHelpcenterQanda.setAnswerContent(coscoPortalsCustomerQanda.getAnswerContent());
|
||||||
|
coscoPortalsHelpcenterQanda.setType(coscoPortalsCustomerQanda.getType());
|
||||||
|
coscoPortalsHelpcenterQanda.setIsTop(coscoPortalsCustomerQanda.getIsTop());
|
||||||
|
insertCoscoPortalsHelpcenterQanda(coscoPortalsHelpcenterQanda);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改中远门户_帮助中心_问答
|
* 修改中远门户_帮助中心_问答
|
||||||
*
|
*
|
||||||
@ -137,4 +149,6 @@ public class CoscoPortalsHelpcenterQandaServiceImpl extends BaseServiceImpl<Cosc
|
|||||||
qanda.setUpdateBy(currentUser.getUserId());
|
qanda.setUpdateBy(currentUser.getUserId());
|
||||||
return coscoPortalsHelpcenterQandaMapper.updateCoscoPortalsHelpcenterQanda(qanda);
|
return coscoPortalsHelpcenterQandaMapper.updateCoscoPortalsHelpcenterQanda(qanda);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -54,8 +54,8 @@ spring:
|
|||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: Unicom@2024
|
password: Unicom@2024
|
||||||
jdbc-url: jdbc:mysql://59.110.10.99:53306/cosco_supplier_manager?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
|
jdbc-url: jdbc:mysql://59.110.10.99:53306/cosco_portals_manage?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
|
||||||
url: jdbc:mysql://59.110.10.99:53306/cosco_supplier_manager?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
|
url: jdbc:mysql://59.110.10.99:53306/cosco_portals_manage?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
|
||||||
filters: stat,wall,log4j
|
filters: stat,wall,log4j
|
||||||
maxActive: 20
|
maxActive: 20
|
||||||
initialSize: 1
|
initialSize: 1
|
||||||
@ -134,7 +134,7 @@ mybatis-plus:
|
|||||||
auto-mapping-behavior: full
|
auto-mapping-behavior: full
|
||||||
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
|
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
|
||||||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
mapper-locations: classpath*:com/chinaunicom/**/mapper/*Mapper.xml
|
mapper-locations: classpath*:com/chinaunicom/**/*Mapper.xml
|
||||||
global-config:
|
global-config:
|
||||||
# 逻辑删除配置
|
# 逻辑删除配置
|
||||||
db-config:
|
db-config:
|
||||||
|
Reference in New Issue
Block a user