feiyu02
2025-09-30 6904763f0e74d9a9fa4dbc39f635d2aee39416c6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package cn.flightfeather.supervision.common.creditcode
 
import cn.flightfeather.supervision.domain.mapper.BaseInfoMapper
import cn.flightfeather.supervision.lightshare.vo.BaseResponse
import org.junit.Test
import org.junit.jupiter.api.extension.ExtendWith
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit.jupiter.SpringExtension
import org.springframework.test.context.junit4.SpringRunner
import java.io.File
import java.io.FileOutputStream
 
@RunWith(SpringRunner::class)
@ExtendWith(SpringExtension::class)
@SpringBootTest
class EnvCreditCodeTest{
 
    @Autowired
    lateinit var baseInfoMapper: BaseInfoMapper
 
    @Test
    fun createQRCode() {
        val info = baseInfoMapper.selectByPrimaryKey("1Qo1GHlHK3tHbcFK")
        val supply = "${info.biCityName}${info.biDistrictName}生态环境局"
        val file = FileOutputStream("target/default.png")
        EnvCreditCode.createImage(info.biGuid, info.biName, info.ciName, supply, file)
    }
}