[admin]增加评价功能

master
NH-LHG 2 years ago
parent 1fc874a8ed
commit 966ad3db55

@ -20,15 +20,14 @@ import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions;
/** /**
* @Description: * @Description:
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-06-05 * @Date: 2023-06-07
* @Version: V1.0 * @Version: V1.0
*/ */
@Api(tags="评") @Api(tags="评")
@RestController @RestController
@RequestMapping("/erp/bbs") @RequestMapping("/erp/bbs")
@Slf4j @Slf4j
@ -45,8 +44,8 @@ public class BbsController extends JeecgController<Bbs, IBbsService> {
* @param req * @param req
* @return * @return
*/ */
//@AutoLog(value = "评-分页列表查询") //@AutoLog(value = "评-分页列表查询")
@ApiOperation(value="评论-分页列表查询", notes="评论-分页列表查询") @ApiOperation(value="评价-分页列表查询", notes="评价-分页列表查询")
@GetMapping(value = "/list") @GetMapping(value = "/list")
public Result<IPage<Bbs>> queryPageList(Bbs bbs, public Result<IPage<Bbs>> queryPageList(Bbs bbs,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@ -64,9 +63,8 @@ public class BbsController extends JeecgController<Bbs, IBbsService> {
* @param bbs * @param bbs
* @return * @return
*/ */
@AutoLog(value = "评论-添加") @AutoLog(value = "评价-添加")
@ApiOperation(value="评论-添加", notes="评论-添加") @ApiOperation(value="评价-添加", notes="评价-添加")
//@RequiresPermissions("erp:bbs:add")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<String> add(@RequestBody Bbs bbs) { public Result<String> add(@RequestBody Bbs bbs) {
bbsService.save(bbs); bbsService.save(bbs);
@ -79,9 +77,8 @@ public class BbsController extends JeecgController<Bbs, IBbsService> {
* @param bbs * @param bbs
* @return * @return
*/ */
@AutoLog(value = "评论-编辑") @AutoLog(value = "评价-编辑")
@ApiOperation(value="评论-编辑", notes="评论-编辑") @ApiOperation(value="评价-编辑", notes="评价-编辑")
//@RequiresPermissions("erp:bbs:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody Bbs bbs) { public Result<String> edit(@RequestBody Bbs bbs) {
bbsService.updateById(bbs); bbsService.updateById(bbs);
@ -94,9 +91,8 @@ public class BbsController extends JeecgController<Bbs, IBbsService> {
* @param id * @param id
* @return * @return
*/ */
@AutoLog(value = "评论-通过id删除") @AutoLog(value = "评价-通过id删除")
@ApiOperation(value="评论-通过id删除", notes="评论-通过id删除") @ApiOperation(value="评价-通过id删除", notes="评价-通过id删除")
//@RequiresPermissions("erp:bbs:delete")
@DeleteMapping(value = "/delete") @DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) { public Result<String> delete(@RequestParam(name="id",required=true) String id) {
bbsService.removeById(id); bbsService.removeById(id);
@ -109,9 +105,8 @@ public class BbsController extends JeecgController<Bbs, IBbsService> {
* @param ids * @param ids
* @return * @return
*/ */
@AutoLog(value = "评论-批量删除") @AutoLog(value = "评价-批量删除")
@ApiOperation(value="评论-批量删除", notes="评论-批量删除") @ApiOperation(value="评价-批量删除", notes="评价-批量删除")
//@RequiresPermissions("erp:bbs:deleteBatch")
@DeleteMapping(value = "/deleteBatch") @DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.bbsService.removeByIds(Arrays.asList(ids.split(","))); this.bbsService.removeByIds(Arrays.asList(ids.split(",")));
@ -124,8 +119,8 @@ public class BbsController extends JeecgController<Bbs, IBbsService> {
* @param id * @param id
* @return * @return
*/ */
//@AutoLog(value = "评-通过id查询") //@AutoLog(value = "评-通过id查询")
@ApiOperation(value="评论-通过id查询", notes="评论-通过id查询") @ApiOperation(value="评价-通过id查询", notes="评价-通过id查询")
@GetMapping(value = "/queryById") @GetMapping(value = "/queryById")
public Result<Bbs> queryById(@RequestParam(name="id",required=true) String id) { public Result<Bbs> queryById(@RequestParam(name="id",required=true) String id) {
Bbs bbs = bbsService.getById(id); Bbs bbs = bbsService.getById(id);
@ -141,10 +136,9 @@ public class BbsController extends JeecgController<Bbs, IBbsService> {
* @param request * @param request
* @param bbs * @param bbs
*/ */
//@RequiresPermissions("erp:bbs:exportXls")
@RequestMapping(value = "/exportXls") @RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Bbs bbs) { public ModelAndView exportXls(HttpServletRequest request, Bbs bbs) {
return super.exportXls(request, bbs, Bbs.class, "评"); return super.exportXls(request, bbs, Bbs.class, "评");
} }
/** /**
@ -154,7 +148,6 @@ public class BbsController extends JeecgController<Bbs, IBbsService> {
* @param response * @param response
* @return * @return
*/ */
//@RequiresPermissions("erp:bbs:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, Bbs.class); return super.importExcel(request, response, Bbs.class);

@ -16,16 +16,16 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
/** /**
* @Description: * @Description:
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-06-05 * @Date: 2023-06-07
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("bbs") @TableName("bbs")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@ApiModel(value="bbs对象", description="评") @ApiModel(value="bbs对象", description="评")
public class Bbs implements Serializable { public class Bbs implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -58,6 +58,30 @@ public class Bbs implements Serializable {
@Excel(name = "用户id", width = 15) @Excel(name = "用户id", width = 15)
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id")
private java.lang.String userId; private java.lang.String userId;
/**物流打分满分5星*/
@Excel(name = "物流打分满分5星", width = 15)
@ApiModelProperty(value = "物流打分满分5星")
private java.lang.String deliveryScore;
/**商品打分满分5星*/
@Excel(name = "商品打分满分5星", width = 15)
@ApiModelProperty(value = "商品打分满分5星")
private java.lang.String qualityScore;
/**服务打分满分5星*/
@Excel(name = "服务打分满分5星", width = 15)
@ApiModelProperty(value = "服务打分满分5星")
private java.lang.String serviceScore;
/**是否推荐打分满分5星*/
@Excel(name = "是否推荐打分满分5星", width = 15)
@ApiModelProperty(value = "是否推荐打分满分5星")
private java.lang.String suggestScore;
/**图片url*/
@Excel(name = "图片url", width = 15)
@ApiModelProperty(value = "图片url")
private java.lang.String url;
/**产品id*/
@Excel(name = "产品id", width = 15)
@ApiModelProperty(value = "产品id")
private java.lang.Integer goodId;
/**产品*/ /**产品*/
@Excel(name = "产品", width = 15) @Excel(name = "产品", width = 15)
@ApiModelProperty(value = "产品") @ApiModelProperty(value = "产品")

@ -67,6 +67,10 @@ public class Order implements Serializable {
/**更新人*/ /**更新人*/
@ApiModelProperty(value = "更新人") @ApiModelProperty(value = "更新人")
private java.lang.String updateBy; private java.lang.String updateBy;
/**审核人id*/
@Excel(name = "审核人id", width = 15)
@ApiModelProperty(value = "审核人id")
private java.lang.String financeId;
/**审核人*/ /**审核人*/
@Excel(name = "审核人", width = 15) @Excel(name = "审核人", width = 15)
@ApiModelProperty(value = "审核人") @ApiModelProperty(value = "审核人")
@ -81,10 +85,22 @@ public class Order implements Serializable {
@Excel(name = "审核意见", width = 15) @Excel(name = "审核意见", width = 15)
@ApiModelProperty(value = "审核意见") @ApiModelProperty(value = "审核意见")
private java.lang.String financeRemark; private java.lang.String financeRemark;
/**派单人Id*/
@Excel(name = "派单人Id", width = 15)
@ApiModelProperty(value = "派单人Id")
private java.lang.String dispacherId;
/**派单人*/ /**派单人*/
@Excel(name = "派单人", width = 15) @Excel(name = "派单人", width = 15)
@ApiModelProperty(value = "派单人") @ApiModelProperty(value = "派单人")
private java.lang.String dispacher; private java.lang.String dispacher;
/**物流单号*/
@Excel(name = "物流单号", width = 15)
@ApiModelProperty(value = "物流单号")
private java.lang.String logisticsId;
/**派单备注*/
@Excel(name = "派单备注", width = 15)
@ApiModelProperty(value = "派单备注")
private java.lang.String dispacherRemark;
/**派发时间*/ /**派发时间*/
@Excel(name = "派发时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") @Excel(name = "派发时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")

@ -7,9 +7,9 @@ import org.jeecg.modules.demo.erp.entity.Bbs;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/** /**
* @Description: * @Description:
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-06-05 * @Date: 2023-06-07
* @Version: V1.0 * @Version: V1.0
*/ */
public interface BbsMapper extends BaseMapper<Bbs> { public interface BbsMapper extends BaseMapper<Bbs> {

@ -4,9 +4,9 @@ import org.jeecg.modules.demo.erp.entity.Bbs;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* @Description: * @Description:
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-06-05 * @Date: 2023-06-07
* @Version: V1.0 * @Version: V1.0
*/ */
public interface IBbsService extends IService<Bbs> { public interface IBbsService extends IService<Bbs> {

@ -8,9 +8,9 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/** /**
* @Description: * @Description:
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-06-05 * @Date: 2023-06-07
* @Version: V1.0 * @Version: V1.0
*/ */
@Service @Service

Loading…
Cancel
Save