package cn.pluss.platform.controller;


import cn.pluss.platform.annotation.OpLog;
import cn.pluss.platform.api.Result;
import cn.pluss.platform.api.ResultGenerator;
import cn.pluss.platform.base.BaseModelController;
import cn.pluss.platform.entity.MerchantMoveRecords;
import cn.pluss.platform.merchant.move.MerchantMoveRecordsService;
import lombok.val;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 商户动态码生成记录 前端控制器
 * </p>
 *
 * @author bzg
 * @since 2021-07-30
 */
@RestController
@RequestMapping("/merchantMoveRecords")
public class MerchantMoveRecordsController extends BaseModelController<MerchantMoveRecordsService, MerchantMoveRecords> {

    @OpLog(opName = "APP生成动态码", opDetail = "APP生成动态码", opCode = "APP_DYNAMIC")
    @GetMapping("/getDynamicCode")
    public Result<Object> getToken() {
        val record = baseService.createToken();
        return ResultGenerator.genSuccessResult(record);
    }
}
