feiyu02
2024-08-15 196bb14112448857a885e32dc4149e308e00b01a
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
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
 
@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 = File("C:/default.png")
        EnvCreditCode.createImage(info.biGuid, info.biName, info.ciName, supply, file.outputStream())
    }
}